Skip to content

Commit c8b9285

Browse files
committed
QUICK fix
1 parent 8665ac7 commit c8b9285

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/controllers/v4/internal/user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const processUserAction = async (req, res, next) => {
4747
}
4848

4949
const userId = req.params.id;
50-
const { action, amount, reason, executor, expiry, old_token, new_token, isForced } = req.body; // Extract fields from the request body
50+
const { action, amount, reason, value, executor, expiry, old_token, new_token, isForced } = req.body; // Extract fields from the request body
5151

5252
if (!action) {
5353
return res.status(400).json({ message: 'Action is required in body' }); // Action is required
@@ -75,7 +75,7 @@ const processUserAction = async (req, res, next) => {
7575
_id: user.status_history.length + 1,
7676
timestamp: new Date(),
7777
reason: reason || 'Quota added',
78-
value: `+${amount} quota`,
78+
value: value || `+${amount} quota`,
7979
executor: executor || 'system',
8080
});
8181

@@ -96,7 +96,7 @@ const processUserAction = async (req, res, next) => {
9696
_id: user.status_history.length + 1,
9797
timestamp: new Date(),
9898
reason: reason || 'Quota removed',
99-
value: `-${amount} quota`,
99+
value: value || `-${amount} quota`,
100100
executor: executor || 'system',
101101
});
102102

0 commit comments

Comments
 (0)