feat: get section for admin

This commit is contained in:
elangptra 2024-11-20 19:16:07 +07:00
parent 1fa2a67a01
commit d90606a132
2 changed files with 3 additions and 2 deletions

View File

@ -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, distinct: true,
}); });
@ -67,6 +67,7 @@ export const getSectionForAdmin = async (req, res) => {
ID_SECTION: section.ID_SECTION, ID_SECTION: section.ID_SECTION,
NAME_SECTION: section.NAME_SECTION, NAME_SECTION: section.NAME_SECTION,
DESCRIPTION_SECTION: section.DESCRIPTION_SECTION, DESCRIPTION_SECTION: section.DESCRIPTION_SECTION,
THUMBNAIL: section.THUMBNAIL,
TIME_SECTION: section.TIME_SECTION, TIME_SECTION: section.TIME_SECTION,
})); }));

View File

@ -36,7 +36,7 @@ app.use(cookieParser());
app.use(express.json()); app.use(express.json());
app.use(express.urlencoded({ extended: true })); app.use(express.urlencoded({ extended: true }));
app.use(router); 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 17 * * *", async () => { ini kalau timezone servernya UTC
cron.schedule("0 0 * * *", async () => { cron.schedule("0 0 * * *", async () => {