mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-02-05 08:38:33 -06:00
22 lines
523 B
JavaScript
22 lines
523 B
JavaScript
import { Router } from "express";
|
|
|
|
class QueueRoutes {
|
|
constructor(queueController) {
|
|
this.router = Router();
|
|
this.queueController = queueController;
|
|
this.initRoutes();
|
|
}
|
|
initRoutes() {
|
|
this.router.get("/metrics", this.queueController.getMetrics);
|
|
this.router.get("/jobs", this.queueController.getJobs);
|
|
this.router.post("/jobs", this.queueController.addJob);
|
|
this.router.post("/obliterate", this.queueController.obliterateQueue);
|
|
}
|
|
|
|
getRouter() {
|
|
return this.router;
|
|
}
|
|
}
|
|
|
|
export default QueueRoutes;
|