mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Merge branch 'master' of gitlab.com:MrFry/mrfrys-node-server
This commit is contained in:
commit
ea5816a289
1 changed files with 5 additions and 3 deletions
|
@ -59,14 +59,16 @@ function setup(data: SubmoduleData): void {
|
|||
// -----------------------------------------------------------------
|
||||
|
||||
socket.join(userid.toString())
|
||||
let currUser = dbtools.Select(msgDB, 'users', {
|
||||
let currUser: any = dbtools.Select(msgDB, 'users', {
|
||||
id: userid,
|
||||
})[0]
|
||||
if (!currUser) {
|
||||
})
|
||||
if (!currUser || currUser.length === 0) {
|
||||
currUser = {
|
||||
id: userid,
|
||||
}
|
||||
dbtools.Insert(msgDB, 'users', currUser)
|
||||
} else {
|
||||
currUser = currUser[0]
|
||||
}
|
||||
|
||||
const groups = dbtools
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue