pangolin/server/auth/unauthorizedResponse.ts
2024-10-02 20:42:50 -04:00

6 lines
212 B
TypeScript

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