dashboard-core/theme/dbd-soft-ui/pages/get/settings.js

11 lines
397 B
JavaScript
Raw Normal View History

2023-06-19 14:21:58 +05:00
module.exports = {
2023-06-22 19:36:52 +05:00
page: "/settings/:id/:category",
// eslint-disable-next-line no-unused-vars
execute: async (req, res, app, config, themeConfig, info) => {
const categoryExists = config.settings?.find(s => s.categoryId === req.params.category);
2023-06-19 14:21:58 +05:00
2023-06-22 19:36:52 +05:00
if (!categoryExists) return config.errorPage(req, res, null, 404);
await config.guildSettings(req, res, false, req.params.category);
},
};