Compare commits
2 Commits
1e840ce0ce
...
38739a3a0c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38739a3a0c | ||
|
|
763322a492 |
@@ -11,7 +11,8 @@
|
|||||||
"@money/shared": "link:../shared",
|
"@money/shared": "link:../shared",
|
||||||
"better-auth": "^1.3.27",
|
"better-auth": "^1.3.27",
|
||||||
"hono": "^4.9.12",
|
"hono": "^4.9.12",
|
||||||
"plaid": "^39.0.0"
|
"plaid": "^39.0.0",
|
||||||
|
"tsx": "^4.20.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^24.7.2"
|
"@types/node": "^24.7.2"
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ app.get("/", (c) => c.text("OK"));
|
|||||||
serve(
|
serve(
|
||||||
{
|
{
|
||||||
fetch: app.fetch,
|
fetch: app.fetch,
|
||||||
port: 3000,
|
port: process.env.PORT ? parseInt(process.env.PORT) : 3000,
|
||||||
},
|
},
|
||||||
(info) => {
|
(info) => {
|
||||||
console.log(`Server is running on ${info.address}:${info.port}`);
|
console.log(`Server is running on ${info.address}:${info.port}`);
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ const createMutators = (authData: AuthData | null) => {
|
|||||||
const { data } = await plaidClient.transactionsGet({
|
const { data } = await plaidClient.transactionsGet({
|
||||||
access_token: account.token,
|
access_token: account.token,
|
||||||
start_date: "2025-10-01",
|
start_date: "2025-10-01",
|
||||||
end_date: "2025-10-15",
|
end_date: "2025-10-18",
|
||||||
});
|
});
|
||||||
|
|
||||||
const transactions = data.transactions.map(tx => ({
|
const transactions = data.transactions.map(tx => ({
|
||||||
|
|||||||
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@@ -147,6 +147,9 @@ importers:
|
|||||||
plaid:
|
plaid:
|
||||||
specifier: ^39.0.0
|
specifier: ^39.0.0
|
||||||
version: 39.0.0
|
version: 39.0.0
|
||||||
|
tsx:
|
||||||
|
specifier: ^4.20.6
|
||||||
|
version: 4.20.6
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@types/node':
|
'@types/node':
|
||||||
specifier: ^24.7.2
|
specifier: ^24.7.2
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { syncedQueryWithContext } from "@rocicorp/zero";
|
import { syncedQueryWithContext } from "@rocicorp/zero";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import { builder } from "@money/shared";
|
import { builder } from ".";
|
||||||
import { type AuthData } from "./auth";
|
import { type AuthData } from "./auth";
|
||||||
import { isLoggedIn } from "./zql";
|
import { isLoggedIn } from "./zql";
|
||||||
|
|
||||||
@@ -13,12 +13,6 @@ export const queries = {
|
|||||||
.limit(50)
|
.limit(50)
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
me: syncedQueryWithContext('me', z.tuple([]), (authData: AuthData | null) => {
|
|
||||||
isLoggedIn(authData);
|
|
||||||
return builder.users
|
|
||||||
.where('id', '=', authData.user.id)
|
|
||||||
.one();
|
|
||||||
}),
|
|
||||||
getPlaidLink: syncedQueryWithContext('getPlaidLink', z.tuple([]), (authData: AuthData | null) => {
|
getPlaidLink: syncedQueryWithContext('getPlaidLink', z.tuple([]), (authData: AuthData | null) => {
|
||||||
isLoggedIn(authData);
|
isLoggedIn(authData);
|
||||||
return builder.plaidLink
|
return builder.plaidLink
|
||||||
|
|||||||
Reference in New Issue
Block a user