This commit is contained in:
Alex Holliday committed 2026-03-20 11:42:40 -07:00
1 parent 8322adbb26
commit 6fb7ad63f6
3 files changed
+29 -4

No files matched your search

+18 -1
View File
@@ -23,7 +23,24 @@ import { IUserService } from "@/service/index.js";
const SERVICE_NAME = "authController";
class AuthController {
export interface IAuthController {
registerUser(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
createUser(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
loginUser(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
editUser(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
checkSuperadminExists(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
requestRecovery(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
validateRecovery(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
resetPassword(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
deleteUser(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
deleteUserById(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
getAllUsers(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
getUserById(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
editUserById(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
editUserPasswordById(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
}
class AuthController implements IAuthController {
static SERVICE_NAME = SERVICE_NAME;
private userService: IUserService;
+8 -1
View File
@@ -6,7 +6,14 @@ import { IEmailService, ISettingsService } from "@/service/index.js";
const SERVICE_NAME = "SettingsController";
class SettingsController {
export interface ISettingsController {
serviceName: string;
getAppSettings(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
updateAppSettings(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
sendTestEmail(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
}
class SettingsController implements ISettingsController {
static SERVICE_NAME = SERVICE_NAME;
private settingsService: ISettingsService;
private emailService: IEmailService;
+3 -2
View File
@@ -1,11 +1,12 @@
import { Router } from "express";
import { isAllowed } from "../middleware/isAllowed.js";
import { ISettingsController } from "@/controllers/settingsController.js";
class SettingsRoutes {
private router: Router;
private settingsController: any;
private settingsController: ISettingsController;
constructor(settingsController: any) {
constructor(settingsController: ISettingsController) {
this.router = Router();
this.settingsController = settingsController;
this.initRoutes();