fosrl.pangolin/server/auth/unauthorizedResponse.ts

7 lines
212 B
TypeScript
Raw Normal View History

import HttpCode from "@server/types/HttpCode";
import createHttpError from "http-errors";
export function unauthorized(msg?: string) {
return createHttpError(HttpCode.UNAUTHORIZED, msg || "Unauthorized");
}