mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(api): ♻️ Properly reuse error messages and schemas
This commit is contained in:
parent
7112a66e4c
commit
65e2e19ff1
84 changed files with 478 additions and 597 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import type { OpenAPIHono } from "@hono/zod-openapi";
|
||||
import { z } from "@hono/zod-openapi";
|
||||
import type { z } from "@hono/zod-openapi";
|
||||
import type {
|
||||
Delete,
|
||||
Follow,
|
||||
|
|
@ -18,10 +18,6 @@ import type { AuthData } from "~/classes/functions/user";
|
|||
|
||||
export type HttpVerb = "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "OPTIONS";
|
||||
|
||||
export const ErrorSchema = z.object({
|
||||
error: z.string(),
|
||||
});
|
||||
|
||||
export type HonoEnv = {
|
||||
Variables: {
|
||||
config: z.infer<typeof ConfigSchema>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue