env
This commit is contained in:
1 parent
92f7a929fa
commit
16c7a007d5
4 files changed
+48
-1
No files matched your search
@@ -1,10 +1,10 @@
|
||||
import { Request, Response, NextFunction } from "express";
|
||||
import type { IDiagnosticService } from "@/services/business/DiagnosticService.js";
|
||||
import type { IJobData } from "@/services/infrastructure/JobQueue.js";
|
||||
|
||||
export interface IDiagnosticController {
|
||||
getLogs: (req: Request, res: Response, next: NextFunction) => void;
|
||||
getJobs(req: Request, res: Response, next: NextFunction): Promise<void>;
|
||||
getEnv(req: Request, res: Response, next: NextFunction): void;
|
||||
}
|
||||
|
||||
class DiagnosticController implements IDiagnosticController {
|
||||
@@ -30,6 +30,15 @@ class DiagnosticController implements IDiagnosticController {
|
||||
next(error);
|
||||
}
|
||||
};
|
||||
|
||||
getEnv = (req: Request, res: Response, next: NextFunction) => {
|
||||
try {
|
||||
const data = this.diagnosticService.getEnv();
|
||||
res.status(200).json({ message: "OK", data });
|
||||
} catch (error) {
|
||||
next(error);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default DiagnosticController;
|
||||
Reference in new issue
Block a user