Add full project files

This commit is contained in:
root
2026-07-04 19:24:56 +03:30
parent d54f5441a3
commit b245e7b71a
835 changed files with 30149 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
// controllers/settingController.js
const SettingModel = require('../../../models/SettingsModel')
// متد برای دریافت تنظیمات بر اساس key
const getSetting = async (req, res, next) => {
try {
const { key } = req.params
const setting = await SettingModel.findOne({ key })
if (!setting) {
return res.status(404).json({ message: 'تنظیمات مورد نظر یافت نشد' })
}
res.status(200).json(setting)
} catch (error) {
next(error)
}
}
module.exports = { getSetting }