[feat] Adding RemoteUser authentication

This commit is contained in:
Marc Hagen
2022-04-24 13:21:56 +02:00
parent 88b7c047a8
commit 86ee98e0e8
6 changed files with 146 additions and 76 deletions

View File

@@ -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;