From c134bff5c1a125b0823a2bbb7a5d71c7f0789d47 Mon Sep 17 00:00:00 2001 From: JeongSH1 Date: Fri, 8 Dec 2023 12:59:03 +0900 Subject: [PATCH] =?UTF-8?q?enhancement:=20update,=20save=20log=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/save-token.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/save-token.js b/db/save-token.js index c1c35fa..c06eb32 100644 --- a/db/save-token.js +++ b/db/save-token.js @@ -6,9 +6,12 @@ export async function saveToken(userId, token) { if (!token){ const [rows, fields] = await connection.execute('insert into tokens values(?, ?)', [userId, token]); + console.log(`${new Date()}: ${userId} save Token`) return rows; } else { const [rows, fields] = await connection.execute('update tokens set token = ? where userId = ?', [token, userId]); + console.log(`${new Date()}: ${userId} update Token`) return rows; } + } \ No newline at end of file