diagnostic
This commit is contained in:
1 parent
05c293d689
commit
7456609e35
2 files changed
+9
-3
No files matched your search
@@ -2,7 +2,12 @@ import { IDiagnosticService } from "@/service/index.js";
|
||||
import { Request, Response, NextFunction } from "express";
|
||||
|
||||
const SERVICE_NAME = "diagnosticController";
|
||||
class DiagnosticController {
|
||||
|
||||
export interface IDiagnosticController {
|
||||
getSystemStats: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
|
||||
}
|
||||
|
||||
class DiagnosticController implements IDiagnosticController {
|
||||
static SERVICE_NAME = SERVICE_NAME;
|
||||
|
||||
private diagnosticService: IDiagnosticService;
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { RequestHandler, Router } from "express";
|
||||
import { isAllowed } from "../middleware/isAllowed.js";
|
||||
import { IDiagnosticController } from "@/controllers/diagnosticController.js";
|
||||
|
||||
class DiagnosticRoutes {
|
||||
private router: Router;
|
||||
private diagnosticController: any;
|
||||
private diagnosticController: IDiagnosticController;
|
||||
|
||||
constructor(diagnosticController: any, verifyJWT: RequestHandler) {
|
||||
constructor(diagnosticController: IDiagnosticController, verifyJWT: RequestHandler) {
|
||||
this.router = Router();
|
||||
this.diagnosticController = diagnosticController;
|
||||
this.initRoutes(verifyJWT);
|
||||
|
||||
Reference in new issue
Block a user