refactor: 🔥 Remove dead code

This commit is contained in:
Jesse Wierzbinski 2024-05-07 03:13:37 +00:00
parent 592f7c0ac2
commit 7b05a34cce
No known key found for this signature in database
36 changed files with 32 additions and 1692 deletions

View file

@ -1,5 +1,10 @@
export interface APIRouteMeta {
allowedMethods: ("GET" | "POST" | "PUT" | "DELETE" | "PATCH")[];
import type { Hono } from "hono";
import type { RouterRoute } from "hono/types";
import type { z } from "zod";
export type HttpVerb = "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "OPTIONS";
export interface APIRouteMetadata {
allowedMethods: HttpVerb[];
ratelimits: {
max: number;
duration: number;
@ -7,7 +12,16 @@ export interface APIRouteMeta {
route: string;
auth: {
required: boolean;
requiredOnMethods?: ("GET" | "POST" | "PUT" | "DELETE" | "PATCH")[];
requiredOnMethods?: HttpVerb[];
oauthPermissions?: string[];
};
}
export interface APIRouteExports {
meta: APIRouteMetadata;
schemas?: {
query?: z.AnyZodObject;
body?: z.AnyZodObject;
};
default: (app: Hono) => RouterRoute;
}