Fix undefined instead of null in db query

This commit is contained in:
KernelDeimos 2024-04-01 19:41:16 -04:00
parent 59003a9ab9
commit 7442b48157

View File

@ -57,7 +57,7 @@ class MonthlyUsageService extends BaseService {
// 'DO UPDATE SET `count` = `count` + 1 AND `extra` = ?',
}),
[
year, month, key, actor.type.user.id, maybe_app_id, JSON.stringify(extra),
year, month, key, actor.type.user.id, maybe_app_id ?? null, JSON.stringify(extra),
...this.db.case({ mysql: [JSON.stringify(extra)], otherwise: [] }),
]
);