Update:Auth to use new user model

- Express requests include userNew to start migrating API controllers to new user model
This commit is contained in:
advplyr 2024-08-10 15:46:04 -05:00
parent 59370cae81
commit 202ceb02b5
14 changed files with 626 additions and 392 deletions

View file

@ -363,7 +363,7 @@ class Database {
*/
async createRootUser(username, pash, auth) {
if (!this.sequelize) return false
await this.models.user.createRootUser(username, pash, auth)
await this.userModel.createRootUser(username, pash, auth)
this.hasRootUser = true
return true
}
@ -390,11 +390,6 @@ class Database {
return this.models.user.updateFromOld(oldUser)
}
updateBulkUsers(oldUsers) {
if (!this.sequelize) return false
return Promise.all(oldUsers.map((u) => this.updateUser(u)))
}
removeUser(userId) {
if (!this.sequelize) return false
return this.models.user.removeById(userId)