mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 22:09:16 +01:00
refactor(api): ♻️ Simplify route schema definitions
This commit is contained in:
parent
4926d6ff5d
commit
16f302c2dc
74 changed files with 175 additions and 254 deletions
|
|
@ -4,7 +4,7 @@ import { z } from "zod";
|
|||
import { ApiError } from "~/classes/errors/api-error";
|
||||
import { ErrorSchema } from "~/types/api";
|
||||
|
||||
export const schemas = {
|
||||
const schemas = {
|
||||
param: z.object({
|
||||
hash: z.string(),
|
||||
name: z.string(),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { ApiError } from "~/classes/errors/api-error";
|
|||
import { config } from "~/packages/config-manager";
|
||||
import { ErrorSchema } from "~/types/api";
|
||||
|
||||
export const schemas = {
|
||||
const schemas = {
|
||||
param: z.object({
|
||||
id: z
|
||||
.string()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue