1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-08 06:08:20 -05:00

Fix increment / decrement switch. (#325)

* Fix increment / decrement switch.

Replace 'up' with 'increment' as it got renamed on the GSC part some time ago.
This commit is contained in:
xerxes-at 2024-05-07 16:29:37 +02:00 committed by GitHub
parent 27f299c932
commit 1f82596582
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -298,7 +298,7 @@ const plugin = {
const parsedValue = parseInt(event.data['value']); const parsedValue = parseInt(event.data['value']);
const key = event.data['key'].toString(); const key = event.data['key'].toString();
if (!isNaN(parsedValue)) { if (!isNaN(parsedValue)) {
event.data['direction'] = 'up' ? event.data['direction'] == 'increment' ?
(await metaService.incrementPersistentMeta(key, parsedValue, clientId, token)).result : (await metaService.incrementPersistentMeta(key, parsedValue, clientId, token)).result :
(await metaService.decrementPersistentMeta(key, parsedValue, clientId, token)).result; (await metaService.decrementPersistentMeta(key, parsedValue, clientId, token)).result;
} }