message ids array
This commit is contained in:
		@@ -11,7 +11,8 @@ 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);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user