Adding and deleting users

This commit is contained in:
advplyr
2021-08-27 07:01:47 -05:00
parent db0ecfb51b
commit 35808abdf6
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
})
}