add tags controller and routes

This commit is contained in:
Alex Holliday committed 2026-05-19 11:15:42 -07:00
1 parent b1871b31a5
commit 451c752170
2 files changed
+126

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
import { ITagsController } from "@/controllers/tagController.js";
import { Router } from "express";
class TagRoutes {
private router: Router;
private tagController: ITagsController;
constructor(tagController: ITagsController) {
this.router = Router();
this.tagController = tagController;
this.initializeRoutes();
}
initializeRoutes() {
this.router.post("/", this.tagController.createTag);
this.router.get("/team", this.tagController.getTagsByTeamId);
this.router.get("/:id", this.tagController.getTagById);
this.router.delete("/:id", this.tagController.deleteTag);
this.router.patch("/:id", this.tagController.editTag);
}
getRouter() {
return this.router;
}
}
export default TagRoutes;