-> timeseries
This commit is contained in:
1 parent
5c14c68899
commit
e090d3cfd3
91 files changed
+941
-987
No files matched your search
+31
@@ -0,0 +1,31 @@
|
||||
import { Request, Response, NextFunction } from "express";
|
||||
|
||||
const SERVICE_NAME = "diagnosticController";
|
||||
class DiagnosticController {
|
||||
static SERVICE_NAME = SERVICE_NAME;
|
||||
|
||||
private diagnosticService: any;
|
||||
|
||||
constructor(diagnosticService: any) {
|
||||
this.diagnosticService = diagnosticService;
|
||||
}
|
||||
|
||||
get serviceName() {
|
||||
return DiagnosticController.SERVICE_NAME;
|
||||
}
|
||||
|
||||
getSystemStats = async (req: Request, res: Response, next: NextFunction) => {
|
||||
try {
|
||||
const diagnostics = await this.diagnosticService.getSystemStats();
|
||||
return res.status(200).json({
|
||||
success: true,
|
||||
msg: "OK",
|
||||
data: diagnostics,
|
||||
});
|
||||
} catch (error) {
|
||||
next(error);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default DiagnosticController;
|
||||
Reference in new issue
Block a user