summaryrefslogtreecommitdiffstats
path: root/server/lib/log.js
diff options
context:
space:
mode:
authorJannik Schönartz2019-03-18 18:27:55 +0100
committerJannik Schönartz2019-03-18 18:27:55 +0100
commitf486a08621eec271889c4e2108e0038a98e78946 (patch)
tree18150cd68cdcdee42a2a62ce2a124badaf6f4cbb /server/lib/log.js
parent[server/log] sql JSON to TEXT for mariadb compatibility (diff)
downloadbas-f486a08621eec271889c4e2108e0038a98e78946.tar.gz
bas-f486a08621eec271889c4e2108e0038a98e78946.tar.xz
bas-f486a08621eec271889c4e2108e0038a98e78946.zip
[server/registration] Add server 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 3b5dcd3..fede874 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 = JSON.stringify(await db.group.findOne({ where: { id: groupId }}))
- if (clientId) entry.clientSnapshot = JSON.stringify(await db.client.findOne({ where: { id: clientId }}))
- if (userId) entry.userSnapshot = JSON.stringify(await db.user.findOne({ where: { id: userId }}))
+ if (groupId) entry.groupSnapshot = JSON.stringify(await db.group.findOne({ where: { id: groupId } }))
+ if (clientId) entry.clientSnapshot = JSON.stringify(await db.client.findOne({ where: { id: clientId } }))
+ if (userId) entry.userSnapshot = JSON.stringify(await db.user.findOne({ where: { id: userId } }))
await entry.save()
return entry
}
-module.exports = log \ No newline at end of file
+module.exports = log