0f7af70b90
Updated Docker configuration, refactored middleware for improved error handling, and restructured account, order, plan, profile, and support modules, including their routes, services, and validations. Enhanced email processing queues and utilities for token generation, pagination, and response management to streamline the application architecture and enhance maintainability.
13 lines
824 B
JavaScript
13 lines
824 B
JavaScript
import { Router } from "express";
|
|
import RequestValidator from "../../middlewares/request_validator.js";
|
|
import { support_controller } from "./support.controller.js";
|
|
import { support_validations } from "./support.validation.js";
|
|
import auth from "../../middlewares/auth.js";
|
|
const router = Router();
|
|
router.get("/", auth("ADMIN", "USER"), support_controller.getAllSupport);
|
|
router.post("/", auth("ADMIN", "USER"), RequestValidator(support_validations.create_support), support_controller.createSupport);
|
|
router.get("/:id", auth("ADMIN", "USER"), support_controller.get_single_support);
|
|
router.patch("/:id", auth("ADMIN", "USER"), RequestValidator(support_validations.update_support), support_controller.update_support);
|
|
router.delete("/:id", auth("ADMIN", "USER"), support_controller.delete_support);
|
|
export default router;
|