users: do nothing when nothing to update
This commit is contained in:
@@ -642,6 +642,7 @@ async function update(user, data, auditSource) {
|
||||
args.push(data[k]);
|
||||
}
|
||||
}
|
||||
if (args.length == 0) return; // nothing to do
|
||||
args.push(user.id);
|
||||
|
||||
const [error, result] = await safe(database.query('UPDATE users SET ' + fields.join(', ') + ' WHERE id = ?', args));
|
||||
|
||||
Reference in New Issue
Block a user