Revert "message ids array"

This reverts commit 51bcef67fe409e365a8d7f531c1327ef71db29fb.
This commit is contained in:
Georg Reisinger 2019-03-18 09:47:59 +01:00
parent 51bcef67fe
commit 8ec2f559ea

View File

@ -11,8 +11,7 @@ const stringSimilarity = require('string-similarity');
async function updateUser(uid, mid, name, picture, email) { async function updateUser(uid, mid, name, picture, email) {
try { try {
await nonQuery('INSERT INTO "User" (username, name, picture, email) VALUES ($1, $2, $3, $4);', [uid, name, picture, email]); await nonQuery('INSERT INTO "User" (username, message_id, name, picture, email) VALUES ($1, $2, $3, $4, $5);', [uid, mid, name, picture, email]);
await nonQuery('UPDATE "User" SET message_id = array_append(message_id, $1) WHERE username = $2 ;', [mid, uid]);
} catch (error) { } catch (error) {
console.error(error); console.error(error);