From f486a08621eec271889c4e2108e0038a98e78946 Mon Sep 17 00:00:00 2001 From: Jannik Schönartz Date: Mon, 18 Mar 2019 17:27:55 +0000 Subject: [server/registration] Add server registration --- server/lib/log.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server/lib/log.js') 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 -- cgit v1.2.3-55-g7522