mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-14 17:28:24 +02:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user