More api and database cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user