Skip to content

Commit

Permalink
fix missing ip
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriopass committed Mar 17, 2024
1 parent bc6ed91 commit 58aaff7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions musidex-daemon/src/infrastructure/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 58aaff7

Please sign in to comment.