More api and database cleanup

This commit is contained in:
Dominic Ferrando
2026-09-26 18:41:59 -04:00
parent 930bd61e62
commit 91f682ec71
5 changed files with 11 additions and 6 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ import {
Printful,
Webflow,
} from "@blade-and-brawn/commerce";
import { BigIntIdSchema, DEFAULT_NAME, DUMMY_PASSWORD_HASH, env, log } from "./util";
import { AccountIdSchema, BigIntIdSchema, DEFAULT_NAME, DUMMY_PASSWORD_HASH, env, log } from "./util";
import serverTiming from "@elysia/server-timing";
import jwt from "@elysia/jwt";
import { CommerceService, WOrderStatusSchema } from "./services/commerce";
@@ -471,7 +471,7 @@ export const app = new Elysia()
if (!stats) return status(404, { error: "Account stats not found" });
return stats;
}, {
params: t.Object({ id: t.String() })
params: t.Object({ id: AccountIdSchema })
})
.guard({ authAdmin: true }, (app) => app
.get("/:id", async ({ params: { id } }) => {
@@ -479,7 +479,7 @@ export const app = new Elysia()
if (!account) return status(404, { error: "Account not found" });
return account;
}, {
params: t.Object({ id: t.String() })
params: t.Object({ id: AccountIdSchema })
})
)
.group("/me", { auth: true }, (app) => app