diff --git a/backend/src/app.ts b/backend/src/app.ts index c8888dc..2d3d90b 100644 --- a/backend/src/app.ts +++ b/backend/src/app.ts @@ -7,7 +7,7 @@ import UserInjection from "./app/middleware/UserInjection"; import { UserModel } from "./app/models/User"; interface AuthenticatableRequest { - user: UserModel | null; + user?: UserModel; } declare global { @@ -42,7 +42,9 @@ Routes.forEach(({ path, httpMethod, handler }) => { app.patch(path, handler); break; } + console.log("-------------------------------------------------"); console.log(`${httpMethod}: ${path}`); }); +console.log("-------------------------------------------------"); export default app; diff --git a/backend/src/app/controllers/user/routes.ts b/backend/src/app/controllers/user/routes.ts index a9ff349..d826a5b 100644 --- a/backend/src/app/controllers/user/routes.ts +++ b/backend/src/app/controllers/user/routes.ts @@ -1,6 +1,7 @@ import { RouteCollection } from "../routes"; import create from "./crud/create"; import del from "./crud/delete"; +import forgot from "./crud/forgot"; import login from "./login"; import validate from "./validate"; @@ -20,6 +21,11 @@ const routes: RouteCollection[] = [ path: "/api/v1/user/login", handler: login, }, + { + httpMethod: "GET", + path: "/api/v1/user/forgot", + handler: forgot, + }, { httpMethod: "GET", path: "/api/v1/user/validateEmail",