Adding and deleting users

This commit is contained in:
Mark Cooper 2021-08-27 07:01:47 -05:00
parent 88c7c1632e
commit 23f343f1df
15 changed files with 323 additions and 12 deletions

View file

@ -58,6 +58,7 @@ class Db {
pash: '',
stream: null,
token,
isActive: true,
createdAt: Date.now()
})
}
@ -115,8 +116,10 @@ class Db {
return this.usersDb.insert([user]).then((results) => {
Logger.debug(`[DB] Inserted user ${results.inserted}`)
this.users.push(user)
return true
}).catch((error) => {
Logger.error(`[DB] Insert user Failed ${error}`)
return false
})
}