mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-22 04:46:40 +00:00
used zod codemod
This commit is contained in:
@@ -15,20 +15,16 @@ import { verifyPassword } from "@server/auth/password";
|
||||
import config from "@server/lib/config";
|
||||
import { logAccessAudit } from "#dynamic/lib/logAccessAudit";
|
||||
|
||||
export const authWithPasswordBodySchema = z
|
||||
.object({
|
||||
export const authWithPasswordBodySchema = z.strictObject({
|
||||
password: z.string()
|
||||
})
|
||||
.strict();
|
||||
});
|
||||
|
||||
export const authWithPasswordParamsSchema = z
|
||||
.object({
|
||||
export const authWithPasswordParamsSchema = z.strictObject({
|
||||
resourceId: z
|
||||
.string()
|
||||
.transform(Number)
|
||||
.pipe(z.number().int().positive())
|
||||
})
|
||||
.strict();
|
||||
.pipe(z.int().positive())
|
||||
});
|
||||
|
||||
export type AuthWithPasswordResponse = {
|
||||
session?: string;
|
||||
|
||||
Reference in New Issue
Block a user