Skip to content

Commit 77846c7

Browse files
fix(api): use basecampAccountId for Basecamp API calls
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0ab4dd9 commit 77846c7

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

apps/tracker/app/routes/home.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async function loadData(user: any): Promise<AppData> {
6464

6565
try {
6666
const accessToken = await getValidAccessToken(user.id);
67-
const rawAssignments = await fetchAssignments(user.basecampId, accessToken);
67+
const rawAssignments = await fetchAssignments(user.basecampAccountId, accessToken);
6868

6969
let items = [];
7070
if (Array.isArray(rawAssignments)) {
@@ -74,7 +74,7 @@ async function loadData(user: any): Promise<AppData> {
7474
}
7575

7676
const uniqueBucketIds = Array.from(new Set(items.map((i: BasecampAssignment) => i.bucket?.id?.toString()).filter(Boolean))) as string[];
77-
rawProjects = await fetchProjectDetails(user.basecampId, uniqueBucketIds, accessToken);
77+
rawProjects = await fetchProjectDetails(user.basecampAccountId, uniqueBucketIds, accessToken);
7878

7979
const timesheetEnabledProjectIds = new Set(
8080
rawProjects
@@ -256,7 +256,7 @@ export async function action({ request }: Route.ActionArgs) {
256256
}
257257

258258
if (intent === "STOP_TIMER") {
259-
return await stopTimer(user.id, user.basecampId);
259+
return await stopTimer(user.id, user.basecampAccountId);
260260
}
261261

262262
if (intent === "APPROVE_TIMER") {
@@ -266,7 +266,7 @@ export async function action({ request }: Route.ActionArgs) {
266266
return new Response("Invalid data", { status: 400 });
267267
}
268268

269-
return await approveTimeEntry(user.id, entryId, user.basecampId, Math.floor(durationHours * 3600));
269+
return await approveTimeEntry(user.id, entryId, user.basecampAccountId, Math.floor(durationHours * 3600));
270270
}
271271

272272
if (intent === "SAVE_RULE") {

apps/ws/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ wss.on("connection", (ws) => {
9595
"Content-Type": "application/json",
9696
"x-internal-key": internalKey,
9797
},
98-
body: JSON.stringify({ userId: user.id, basecampId: user.basecampId }),
98+
body: JSON.stringify({ userId: user.id, basecampId: user.basecampAccountId }),
9999
});
100100
} catch (err) {
101101
console.error("Failed to call internal stop API:", err);

0 commit comments

Comments
 (0)