3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-13 05:57:18 +00:00

dashboard: auth fixes, guild listing, config editing

This commit is contained in:
Dragory 2019-06-23 03:40:53 +03:00
parent 0a1cd81035
commit 5279ab06fa
14 changed files with 200 additions and 42 deletions

13
src/api/responses.ts Normal file
View file

@ -0,0 +1,13 @@
import { Response } from "express";
export function unauthorized(res: Response) {
res.status(403).json({ error: "Unauthorized" });
}
export function clientError(res: Response, message: string) {
res.status(400).json({ error: message });
}
export function ok(res: Response) {
res.json({ result: "ok" });
}