message ids array
This commit is contained in:
parent
631e7103d0
commit
51bcef67fe
@ -11,8 +11,9 @@ 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, message_id, name, picture, email) VALUES ($1, $2, $3, $4, $5);', [uid, mid, name, picture, email]);
|
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]);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user