mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-19 08:09:45 -06:00
24 lines
465 B
JavaScript
24 lines
465 B
JavaScript
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) {
|
|
next(handleError(error, SERVICE_NAME, "getLogs"));
|
|
return;
|
|
}
|
|
};
|
|
}
|
|
export default LogController;
|