fix bug
This commit is contained in:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user