mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-09 00:08:46 +00:00
backend refactored
This commit is contained in:
commit
7ba2a34eb1
13 changed files with 684 additions and 16 deletions
16
code/backend/src/schemas/userSchemas.ts
Normal file
16
code/backend/src/schemas/userSchemas.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
// src/schemas/userSchemas.ts
|
||||
import { z } from "zod";
|
||||
|
||||
export const userRegistrationSchema = z.object({
|
||||
username: z.string(),
|
||||
email: z.string().email(),
|
||||
password: z.string().min(8),
|
||||
});
|
||||
|
||||
export const userLoginSchema = z.object({
|
||||
username: z.string(),
|
||||
password: z.string().min(8),
|
||||
});
|
||||
// DTO-Typen aus den Schemas ableiten
|
||||
export type UserRegistrationDto = z.infer<typeof userRegistrationSchema>;
|
||||
export type UserLoginDto = z.infer<typeof userLoginSchema>;
|
Loading…
Add table
Add a link
Reference in a new issue