From 863cffe55e0e815e3490d59a54c61e5cc9661d54 Mon Sep 17 00:00:00 2001 From: Louis Mazin Date: Tue, 9 Dec 2025 19:48:12 +0100 Subject: [PATCH] test --- database.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/database.js b/database.js index afc2617..77e1325 100644 --- a/database.js +++ b/database.js @@ -216,19 +216,12 @@ const cleanExpiredCodes = async () => { ); }; -const updateLastConnection = async (userId) => { +const updateLastConnection = async (steamId) => { const connection = getConnection(); - - // Le userId est au format gdk_STEAMID, on extrait le Steam ID - const steamIdMatch = userId.match(/gdk_(\d+)/); - const steamId = steamIdMatch ? steamIdMatch[1] : userId; - - const [result] = await connection.execute( + await connection.execute( 'UPDATE user_links SET lastConnection = NOW() WHERE steam_id = ?', [steamId] ); - - return { success: true, changes: result.affectedRows }; }; module.exports = {