diff --git a/api/src/index.ts b/api/src/index.ts index 9c79c36..f09b5db 100644 --- a/api/src/index.ts +++ b/api/src/index.ts @@ -47,7 +47,7 @@ app.get("/", (c) => c.text("OK")); serve( { fetch: app.fetch, - port: 3000, + port: process.env.PORT ? parseInt(process.env.PORT) : 3000, }, (info) => { console.log(`Server is running on ${info.address}:${info.port}`); diff --git a/api/src/zero.ts b/api/src/zero.ts index e13ad8b..1bc31ce 100644 --- a/api/src/zero.ts +++ b/api/src/zero.ts @@ -116,7 +116,7 @@ const createMutators = (authData: AuthData | null) => { const { data } = await plaidClient.transactionsGet({ access_token: account.token, start_date: "2025-10-01", - end_date: "2025-10-15", + end_date: "2025-10-18", }); const transactions = data.transactions.map(tx => ({ diff --git a/shared/src/queries.ts b/shared/src/queries.ts index 03ea5ac..bcea14e 100644 --- a/shared/src/queries.ts +++ b/shared/src/queries.ts @@ -1,6 +1,6 @@ import { syncedQueryWithContext } from "@rocicorp/zero"; import { z } from "zod"; -import { builder } from "@money/shared"; +import { builder } from "."; import { type AuthData } from "./auth"; import { isLoggedIn } from "./zql"; @@ -13,12 +13,6 @@ export const queries = { .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) => { isLoggedIn(authData); return builder.plaidLink