Template API: create database schema

This commit is contained in:
2026-04-27 00:03:06 +06:00
parent 61fd639faf
commit 47d30d96eb
9 changed files with 599 additions and 0 deletions
@@ -0,0 +1,22 @@
import { Router } from "express";
import RequestValidator from "../../middlewares/request_validator.js";
import { template_controller } from "./template.controller.js";
import { template_validations } from "./template.validation.js";
const router = Router();
router.get("/", template_controller.get_all_template);
router.post(
"/",
RequestValidator(template_validations.create_template),
template_controller.create_template,
);
router.get("/:id", template_controller.get_single_template);
router.patch(
"/:id",
RequestValidator(template_validations.update_template),
template_controller.update_template,
);
router.delete("/:id", template_controller.delete_template);
export default router;