refactor(api): ♻️ Properly reuse error messages and schemas

This commit is contained in:
Jesse Wierzbinski 2025-03-24 14:42:09 +01:00
parent 7112a66e4c
commit 65e2e19ff1
No known key found for this signature in database
84 changed files with 478 additions and 597 deletions

View file

@ -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>;