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:
parent
0a1cd81035
commit
5279ab06fa
14 changed files with 200 additions and 42 deletions
13
src/api/responses.ts
Normal file
13
src/api/responses.ts
Normal 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" });
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue