mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-19 14:50:50 +08:00
[feat] Adding RemoteUser authentication
This commit is contained in:
@@ -48,6 +48,17 @@ class User extends BeanModel {
|
||||
}, jwtSecret);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} userID ID of user to update
|
||||
* @param {string} newUsername Users new username
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
static async updateUsername(userID, newUsername) {
|
||||
await R.exec("UPDATE `user` SET username = ? WHERE id = ? ", [
|
||||
newUsername,
|
||||
userID
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = User;
|
||||
|
Reference in New Issue
Block a user