feat(controllers): Refactor AuthController and update router reference

- Revised comments replacing 'TODO' with 'FIX' and 'FEAT' in AuthController.
- Renamed 'AuthController.ts' to 'auth.controller.ts' and updated the reference in the router.
- Planned for implementing re-auth by current password in case of password change.

Signed-off-by: Mathis <yidhra@tuta.io>
This commit is contained in:
Mathis H (Avnyr) 2024-04-25 14:23:13 +02:00
parent 73e086be44
commit 36ad90eda6
Signed by: Mathis
GPG Key ID: DD9E0666A747D126
2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ import {Logger} from "tslog";
const logger = new Logger({ name: "AuthController" });
//TODO Better return object interface
//FIX Better return object interface
/**
* Registers a user with the given request data.
*
@ -232,7 +232,7 @@ async function getUser(req: Request, res: Response) {
.json(dbUser);
}
//TODO - Implement re-auth by current password in case of password change
//FEAT - Implement re-auth by current password in case of password change
async function editUser(req: Request, res: Response) {
const body: IReqEditUserData | null = req.body;
if (!body) {

View File

@ -1,7 +1,7 @@
import express, {type Router} from "express";
import UserGuard from "@validators/UserGuard";
import AdminGuard from "@validators/AdminGuard";
import AuthController from "@controllers/AuthController";
import AuthController from "@controllers/auth.controller";
const router: Router = express.Router();