summaryrefslogtreecommitdiffstats
path: root/server/lib/log.js
diff options
context:
space:
mode:
authorJannik Schönartz2019-03-15 15:59:52 +0100
committerJannik Schönartz2019-03-15 15:59:52 +0100
commit07639fbbc1440d8224365a5c0b0ae697989cd0fb (patch)
treeffd523301d993f462dbfdb7c89e84aebf0f65fff /server/lib/log.js
parent[external-backeds] Big idoit rework, to match the updated api (diff)
downloadbas-07639fbbc1440d8224365a5c0b0ae697989cd0fb.tar.gz
bas-07639fbbc1440d8224365a5c0b0ae697989cd0fb.tar.xz
bas-07639fbbc1440d8224365a5c0b0ae697989cd0fb.zip
[server/registration] Add log to the first registration.
Diffstat (limited to 'server/lib/log.js')
-rw-r--r--server/lib/log.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/log.js b/server/lib/log.js
index 22ce264..1f214c5 100644
--- a/server/lib/log.js
+++ b/server/lib/log.js
@@ -11,11 +11,11 @@ async function log ({ category, description, groupId, clientId, userId }) {
clientId,
userId
})
- if (groupId) entry.groupSnapshot = await db.group.findOne({ where: { id: groupId }})
- if (clientId) entry.clientSnapshot = await db.client.findOne({ where: { id: clientId }})
- if (userId) entry.userSnapshot = await db.user.findOne({ where: { id: userId }})
+ if (groupId) entry.groupSnapshot = await db.group.findOne({ where: { id: groupId } })
+ if (clientId) entry.clientSnapshot = await db.client.findOne({ where: { id: clientId } })
+ if (userId) entry.userSnapshot = await db.user.findOne({ where: { id: userId } })
await entry.save()
return entry
}
-module.exports = log \ No newline at end of file
+module.exports = log