Files
Checkmate/server/controllers/logController.js
T

23 lines
465 B
JavaScript
Raw Normal View History

2025-06-23 11:25:42 +08:00
import { handleError } from "./controllerUtils.js";
const SERVICE_NAME = "JobQueueController";
class LogController {
constructor(logger) {
this.logger = logger;
}
getLogs = async (req, res, next) => {
try {
const logs = await this.logger.getLogs();
res.success({
msg: "Logs fetched successfully",
data: logs,
});
} catch (error) {
2025-06-23 20:10:10 +08:00
next(handleError(error, SERVICE_NAME, "getLogs"));
2025-06-23 11:25:42 +08:00
return;
}
};
}
export default LogController;