mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-08 13:38:47 +00:00
added endpoints for profile and feed
This commit is contained in:
parent
9e6eeb27fd
commit
1800056918
22 changed files with 952 additions and 110 deletions
15
code/backend/src/schemas/feedSchemas.ts
Normal file
15
code/backend/src/schemas/feedSchemas.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { string, z } from "zod";
|
||||
|
||||
export const feedQuerySchema = z.object({
|
||||
createdAt: z.string().datetime().optional(),
|
||||
limit: z
|
||||
.string()
|
||||
.transform((val) => parseInt(val, 10))
|
||||
.refine((num) => num > 0 && num <= 30, {
|
||||
message: "Limit must be between 1 and 30",
|
||||
})
|
||||
.optional(),
|
||||
});
|
||||
export const updateBioSchema = z.object({
|
||||
bio: z.string(),
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue