From d90606a13210b7d9d100ee26b4852b352d57d1d6 Mon Sep 17 00:00:00 2001 From: elangptra Date: Wed, 20 Nov 2024 19:16:07 +0700 Subject: [PATCH] feat: get section for admin --- controllers/contentControllers/section.js | 3 ++- index.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/contentControllers/section.js b/controllers/contentControllers/section.js index 10f652a..75f3ab5 100644 --- a/controllers/contentControllers/section.js +++ b/controllers/contentControllers/section.js @@ -59,7 +59,7 @@ export const getSectionForAdmin = async (req, res) => { ], }), }, - attributes: ["ID_SECTION", "NAME_SECTION", "DESCRIPTION_SECTION", "TIME_SECTION"], + attributes: ["ID_SECTION", "NAME_SECTION", "DESCRIPTION_SECTION", "THUMBNAIL", "TIME_SECTION"], distinct: true, }); @@ -67,6 +67,7 @@ export const getSectionForAdmin = async (req, res) => { ID_SECTION: section.ID_SECTION, NAME_SECTION: section.NAME_SECTION, DESCRIPTION_SECTION: section.DESCRIPTION_SECTION, + THUMBNAIL: section.THUMBNAIL, TIME_SECTION: section.TIME_SECTION, })); diff --git a/index.js b/index.js index dd4a6f1..32fc1f5 100644 --- a/index.js +++ b/index.js @@ -36,7 +36,7 @@ app.use(cookieParser()); app.use(express.json()); app.use(express.urlencoded({ extended: true })); app.use(router); -app.use("/media", express.static("public")); +app.use("/api/media", express.static("public")); // cron.schedule("0 17 * * *", async () => { ini kalau timezone servernya UTC cron.schedule("0 0 * * *", async () => {