From 58aaff73de35b895df969312e82641a79bbd053d Mon Sep 17 00:00:00 2001 From: Paris DOUADY Date: Sun, 17 Mar 2024 12:52:44 +0100 Subject: [PATCH] fix missing ip --- musidex-daemon/src/infrastructure/db.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/musidex-daemon/src/infrastructure/db.rs b/musidex-daemon/src/infrastructure/db.rs index 8500fb7..bb24dbf 100644 --- a/musidex-daemon/src/infrastructure/db.rs +++ b/musidex-daemon/src/infrastructure/db.rs @@ -83,12 +83,13 @@ pub struct DbLog { pub fn db_log(c: &Connection, log: DbLog) { let mut stmt = c .prepare_cached( - "INSERT INTO logs (timestamp, user_id, type, action, music_id, target_key, target_value) - VALUES (DATETIME('now'), ?1, ?2, ?3, ?4, ?5, ?6);", + "INSERT INTO logs (timestamp, user_id, ip, type, action, music_id, target_key, target_value) + VALUES (DATETIME('now'), ?1, ?2, ?3, ?4, ?5, ?6, ?7);", ) .unwrap(); stmt.execute(params![ log.user_id.0, + log.ip, match log.type_ { LogType::User => "user", LogType::Tag => "tag",