Skip to content

Commit 935ebda

Browse files
Merge pull request #162 from stemlen/fixes
stb build
2 parents e5d900a + 088c22d commit 935ebda

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/features/auth/server/route.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,10 @@ const app = new Hono()
293293
if (isManagement && applyToOrg) {
294294
// Update Organization Document
295295
const orgDoc = await databases.getDocument(DATABASE_ID, ORGANIZATIONS_ID, orgId);
296-
let billingSettings: any = {};
296+
let billingSettings: Record<string, unknown> = {};
297297
try {
298298
billingSettings = orgDoc.billingSettings ? JSON.parse(orgDoc.billingSettings) : {};
299-
} catch (e) {
299+
} catch {
300300
billingSettings = {};
301301
}
302302

@@ -352,9 +352,10 @@ const app = new Hono()
352352
}
353353

354354
return c.json({ success: true });
355-
} catch (error: any) {
355+
} catch (error) {
356356
console.error("Legal acceptance failed:", error);
357-
return c.json({ error: error.message || "Failed to accept legal terms" }, 500);
357+
const message = error instanceof Error ? error.message : "Failed to accept legal terms";
358+
return c.json({ error: message }, 500);
358359
}
359360
}
360361
)

src/lib/identity-lifecycle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ async function resolveUserLifecycleStateInternal(
386386
}
387387
}
388388
}
389-
} catch (error) {
389+
} catch {
390390
orgLegalAccepted = false;
391391
}
392392
}
@@ -801,7 +801,7 @@ export function isRestrictedOrgMember(state: LifecycleState): boolean {
801801
// ============================================================================
802802

803803
function validateLifecycleInvariant(lifecycle: ResolvedLifecycle) {
804-
const { state, accountType, orgId, hasWorkspace, orgRole } = lifecycle;
804+
const { state, accountType, hasWorkspace, orgRole } = lifecycle;
805805

806806
if (state.startsWith("PERSONAL_")) {
807807
assertInvariant(

0 commit comments

Comments
 (0)