adjusted SSOSettings model and changed all code based on the model

This commit is contained in:
David Leimroth 2022-02-10 14:45:21 +01:00
parent b12a38d12b
commit 3cd09eecba
9 changed files with 251 additions and 103 deletions

View file

@ -14,6 +14,7 @@ class User {
this.lastSeen = null
this.createdAt = null
this.audiobooks = null
this.ssoId = null
this.settings = {}
this.permissions = {}
@ -84,6 +85,7 @@ class User {
toJSON() {
return {
id: this.id,
ssoId: this.ssoId,
username: this.username,
pash: this.pash,
type: this.type,
@ -138,6 +140,7 @@ class User {
this.type = user.type
this.stream = user.stream || null
this.token = user.token
this.ssoId = user.ssoId || ""
if (user.audiobooks) {
this.audiobooks = {}
for (const key in user.audiobooks) {