mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 22:09:16 +01:00
refactor: ⬆️ Upgrade to Zod v4 and hono-openapi 0.5.0
This commit is contained in:
parent
add2429606
commit
24d4150da4
209 changed files with 1331 additions and 1622 deletions
|
|
@ -6,9 +6,8 @@ import { apiRoute, handleZodError } from "@versia-server/kit/api";
|
|||
import { db, Note, User } from "@versia-server/kit/db";
|
||||
import { Notes } from "@versia-server/kit/tables";
|
||||
import { and, eq, inArray } from "drizzle-orm";
|
||||
import { describeRoute } from "hono-openapi";
|
||||
import { resolver, validator } from "hono-openapi/zod";
|
||||
import { z } from "zod";
|
||||
import { describeRoute, resolver, validator } from "hono-openapi";
|
||||
import { z } from "zod/v4";
|
||||
|
||||
const NOTES_PER_PAGE = 20;
|
||||
|
||||
|
|
@ -52,7 +51,7 @@ export default apiRoute((app) =>
|
|||
validator(
|
||||
"param",
|
||||
z.object({
|
||||
uuid: z.string().uuid(),
|
||||
uuid: z.uuid(),
|
||||
}),
|
||||
handleZodError,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue