Merge branch 'main' of https://gits.techvanguard.vn/UKSOURCE/cms.hailearning.edu.vn into hoanganh-03022026-appointment-contact-pricing

This commit is contained in:
LNHA
2026-02-07 09:38:53 +07:00
36 changed files with 2194 additions and 6388 deletions

View File

@@ -4,7 +4,6 @@ const { ensureAuthenticated } = require("../middleware/auth");
const dashboardController = require("../controllers/dashboardController");
const uploadController = require("../controllers/uploadController");
const homeController = require("../controllers/homeController");
const aboutController = require("../controllers/aboutController");
const headerController = require("../controllers/headerController");
const footerController = require("../controllers/footerController");
const aboutUsController = require("../controllers/aboutUsController");
@@ -48,18 +47,9 @@ router.param("code", (req, res, next, code) => {
next();
});
// About
router.get("/about", ensureAuthenticated, aboutController.index);
router.post("/about/update", ensureAuthenticated, aboutController.update);
// AboutUs admin CRUD
// About Us
router.get("/about-us", ensureAuthenticated, aboutUsController.index);
router.get("/about-us/create", ensureAuthenticated, aboutUsController.createForm);
router.post("/about-us/create", ensureAuthenticated, aboutUsController.create);
router.get("/about-us/:id/edit", ensureAuthenticated, aboutUsController.editForm);
router.post("/about-us/:id/update", ensureAuthenticated, aboutUsController.update);
router.post("/about-us/:id/delete", ensureAuthenticated, aboutUsController.delete);
router.get("/about-us/:id/preview", ensureAuthenticated, aboutUsController.preview);
router.post("/about-us/update", ensureAuthenticated, aboutUsController.update);
// Booking admin CRUD removed

View File

@@ -2,7 +2,6 @@ const express = require("express");
const path = require("path");
const router = express.Router();
const homeController = require("../controllers/homeController");
const aboutController = require("../controllers/aboutController");
const aboutUsController = require("../controllers/aboutUsController");
const headerController = require("../controllers/headerController");
const socialLinkController = require("../controllers/socialLinkController");
@@ -38,12 +37,12 @@ router.get("/", (req, res) => {
router.get("/api/home", homeController.api);
// API để lấy dữ liệu about
router.get("/api/about", aboutController.api);
router.get("/api/about", aboutUsController.getAbout);
router.put("/api/about", aboutUsController.updateAbout);
// Public about-us page and API (aboutUs.json flow)
router.get("/about-us", aboutUsController.page);
// Return a list/array of AboutUs records for frontend consumption
router.get("/api/about-us", aboutUsController.apiList);
// Public about-us page and API (legacy support)
router.get("/about-us", aboutUsController.getAbout);
router.get("/api/about-us", aboutUsController.getAbout);
// Header API route
router.get("/api/header", headerController.api);