mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-01 09:15:40 +00:00
auth routes
This commit is contained in:
@@ -17,21 +17,21 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
ajv,
|
||||
DiscordApiErrors,
|
||||
EVENT,
|
||||
FieldErrors,
|
||||
SpacebarApiErrors,
|
||||
getPermission,
|
||||
getRights,
|
||||
normalizeBody,
|
||||
PermissionResolvable,
|
||||
Permissions,
|
||||
RightResolvable,
|
||||
Rights,
|
||||
SpacebarApiErrors,
|
||||
ajv,
|
||||
getPermission,
|
||||
getRights,
|
||||
normalizeBody,
|
||||
} from "@spacebar/util";
|
||||
import { NextFunction, Request, Response } from "express";
|
||||
import { AnyValidateFunction } from "ajv/dist/core";
|
||||
import { NextFunction, Request, Response } from "express";
|
||||
|
||||
declare global {
|
||||
// TODO: fix this
|
||||
@@ -53,6 +53,11 @@ export interface RouteOptions {
|
||||
permission?: PermissionResolvable;
|
||||
right?: RightResolvable;
|
||||
body?: `${string}Schema`; // typescript interface name
|
||||
responses?: {
|
||||
[status: number]: {
|
||||
body?: `${string}Response`;
|
||||
};
|
||||
};
|
||||
test?: {
|
||||
response?: RouteResponse;
|
||||
body?: unknown;
|
||||
|
||||
Reference in New Issue
Block a user