mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-30 22:49:27 +02:00
added utils for unauth, verify, and response
This commit is contained in:
parent
905cfaea34
commit
859abcf296
11 changed files with 125 additions and 69 deletions
6
server/auth/unauthorizedResponse.ts
Normal file
6
server/auth/unauthorizedResponse.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
import HttpCode from "@server/types/HttpCode";
|
||||
import createHttpError from "http-errors";
|
||||
|
||||
export function unauthorized(msg?: string) {
|
||||
return createHttpError(HttpCode.UNAUTHORIZED, msg || "Unauthorized");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue