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:
2026-02-05 02:00:38 +07:00
parent f25f6b9156
commit 1150156556
4 changed files with 25 additions and 26 deletions

View File

@@ -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;