add v2 routes, controllers
This commit is contained in:
1 parent
f4b76baaa2
commit
6d0c560948
38 files changed
+1532
-3
No files matched your search
@@ -2,7 +2,7 @@ import { createCommonDependencies } from "../controllers/v1/baseController.js";
|
||||
|
||||
// Services
|
||||
|
||||
// Controllers
|
||||
// V1 Controllers
|
||||
import MonitorController from "../controllers/v1/monitorController.js";
|
||||
import AuthController from "../controllers/v1/authController.js";
|
||||
import SettingsController from "../controllers/v1/settingsController.js";
|
||||
@@ -15,10 +15,18 @@ import StatusPageController from "../controllers/v1/statusPageController.js";
|
||||
import NotificationController from "../controllers/v1/notificationController.js";
|
||||
import DiagnosticController from "../controllers/v1/diagnosticController.js";
|
||||
|
||||
// V2 Controllers
|
||||
import AuthControllerV2 from "../controllers/v2/AuthController.js";
|
||||
import InviteControllerV2 from "../controllers/v2/InviteController.js";
|
||||
import MaintenanceControllerV2 from "../controllers/v2/MaintenanceController.js";
|
||||
import MonitorControllerV2 from "../controllers/v2/MonitorController.js";
|
||||
import NotificationChannelControllerV2 from "../controllers/v2/NotificationChannelController.js";
|
||||
import QueueControllerV2 from "../controllers/v2/QueueController.js";
|
||||
export const initializeControllers = (services) => {
|
||||
const controllers = {};
|
||||
const commonDependencies = createCommonDependencies(services.db, services.errorService, services.logger, services.stringService);
|
||||
|
||||
// V1
|
||||
controllers.authController = new AuthController(commonDependencies, {
|
||||
settingsService: services.settingsService,
|
||||
emailService: services.emailService,
|
||||
@@ -62,5 +70,13 @@ export const initializeControllers = (services) => {
|
||||
diagnosticService: services.diagnosticService,
|
||||
});
|
||||
|
||||
//V2
|
||||
controllers.authControllerV2 = new AuthControllerV2(services.authServiceV2, services.inviteServiceV2);
|
||||
controllers.inviteControllerV2 = new InviteControllerV2(services.inviteServiceV2);
|
||||
controllers.maintenanceControllerV2 = new MaintenanceControllerV2(services.maintenanceServiceV2);
|
||||
controllers.monitorControllerV2 = new MonitorControllerV2(services.monitorServiceV2);
|
||||
controllers.notificationChannelControllerV2 = new NotificationChannelControllerV2(services.notificationChannelServiceV2);
|
||||
controllers.queueControllerV2 = new QueueControllerV2(services.jobQueueV2);
|
||||
|
||||
return controllers;
|
||||
};
|
||||
Reference in new issue
Block a user