forked from UKSOURCE/cms.hailearning.edu.vn
feat: Refactor header menu and social link controllers to use RESTful method names, remove social link API routes, and add comprehensive social link management to admin routes.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const Header = require("../models/header");
|
||||
|
||||
// Get all social links
|
||||
exports.getAll = async (req, res) => {
|
||||
exports.index = async (req, res) => {
|
||||
try {
|
||||
const header = await Header.findOne({ status: "active" }).sort({ order: 1 });
|
||||
|
||||
@@ -262,7 +262,7 @@ exports.destroy = async (req, res) => {
|
||||
};
|
||||
|
||||
// Bulk update social links (used for reordering and batch updates)
|
||||
exports.bulkUpdate = async (req, res) => {
|
||||
exports.reorder = async (req, res) => {
|
||||
try {
|
||||
const { socialLinks } = req.body;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user