This commit is contained in:
morteza-mortezai
2025-12-13 15:47:17 +03:30
parent 53099bb714
commit beda704e8d
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -11,8 +11,8 @@ module.exports.setFee = [
const { amount } = req.body
const fee = await Settings.findOne({ title: titleKey })
if (fee) {
Settings.amount = amount
await Settings.save()
fee.amount = amount
await fee.save()
return res.status(200).json(fee)
}
const newFee = await Settings.create({ title: titleKey, amount })