mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-09 20:18:48 +00:00
added authentication and swagger
This commit is contained in:
parent
c311e3adda
commit
64c0d79438
8 changed files with 447 additions and 56 deletions
|
@ -2,14 +2,14 @@
|
|||
import { z } from "zod";
|
||||
|
||||
export const userRegistrationSchema = z.object({
|
||||
username: z.string(),
|
||||
username: z.string().regex(/^\S*$/, "Username must not contain spaces"), // No whitespaces allowed,
|
||||
email: z.string().email(),
|
||||
password: z.string().min(8),
|
||||
});
|
||||
|
||||
export const userLoginSchema = z.object({
|
||||
username: z.string(),
|
||||
password: z.string().min(8),
|
||||
username: z.string().regex(/^\S*$/, "Username must not contain spaces"), // No whitespaces allowed,
|
||||
password: z.string(),
|
||||
});
|
||||
// DTO-Typen aus den Schemas ableiten
|
||||
export type UserRegistrationDto = z.infer<typeof userRegistrationSchema>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue