From 8ec2f559ea220536fd06d3e02e60599ec704f353 Mon Sep 17 00:00:00 2001 From: Georg Reisinger <43533139+GeorgReisinger@users.noreply.github.com> Date: Mon, 18 Mar 2019 09:47:59 +0100 Subject: [PATCH] Revert "message ids array" This reverts commit 51bcef67fe409e365a8d7f531c1327ef71db29fb. --- express-server/db-connect/db-connect.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/express-server/db-connect/db-connect.js b/express-server/db-connect/db-connect.js index cba9bfa0..4b0b1521 100644 --- a/express-server/db-connect/db-connect.js +++ b/express-server/db-connect/db-connect.js @@ -11,9 +11,8 @@ const stringSimilarity = require('string-similarity'); async function updateUser(uid, mid, name, picture, email) { try { - await nonQuery('INSERT INTO "User" (username, name, picture, email) VALUES ($1, $2, $3, $4);', [uid, name, picture, email]); - await nonQuery('UPDATE "User" SET message_id = array_append(message_id, $1) WHERE username = $2 ;', [mid, uid]); - + await nonQuery('INSERT INTO "User" (username, message_id, name, picture, email) VALUES ($1, $2, $3, $4, $5);', [uid, mid, name, picture, email]); + } catch (error) { console.error(error); }