mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-29 22:19:31 +02:00
started integrating auth with lucia
This commit is contained in:
parent
a33a8d7367
commit
fc5dca136f
20 changed files with 1341 additions and 61 deletions
14
server/middlewares/notFound.ts
Normal file
14
server/middlewares/notFound.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { NextFunction, Request, Response } from "express";
|
||||
import createHttpError from "http-errors";
|
||||
import HttpCode from "@server/types/HttpCode";
|
||||
|
||||
export function notFoundMiddleware(
|
||||
req: Request,
|
||||
res: Response,
|
||||
next: NextFunction,
|
||||
) {
|
||||
const message = `The requests url is not found - ${req.originalUrl}`;
|
||||
return next(createHttpError(HttpCode.NOT_FOUND, message));
|
||||
}
|
||||
|
||||
export default notFoundMiddleware;
|
Loading…
Add table
Add a link
Reference in a new issue