mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-24 04:44:57 +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:
parent
59370cae81
commit
202ceb02b5
14 changed files with 626 additions and 392 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue