Tokiva-backend-Node / src /schemas /auth.schema.ts
anoderb
feat: initial commit of Tokiva POS Node backend for Hugging Face
ef874e6
Raw
History Blame Contribute Delete
496 Bytes
import { z } from 'zod';
export const loginSchema = z.object({
body: z.object({
username: z.string({ required_error: 'Username wajib diisi' }).min(1, 'Username tidak boleh kosong'),
password: z.string({ required_error: 'Password wajib diisi' }).min(1, 'Password tidak boleh kosong'),
}),
});
export const refreshSchema = z.object({
body: z.object({
refresh_token: z.string({ required_error: 'Refresh token wajib diisi' }).min(1, 'Refresh token tidak boleh kosong'),
}),
});