From 0cd623482c78daf720a359cdf9396c6625c49aff Mon Sep 17 00:00:00 2001 From: philipp Date: Tue, 16 Apr 2024 09:59:39 +0200 Subject: [PATCH] dont clutter logs --- src/tera/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tera/mod.rs b/src/tera/mod.rs index 641a4a9..2c126aa 100644 --- a/src/tera/mod.rs +++ b/src/tera/mod.rs @@ -125,7 +125,7 @@ impl Fairing for Usage { Ok(user_id) => { let db = req.rocket().state::().unwrap(); if let Some(user) = User::find_by_id(db, user_id).await { - user.name + format!("User: {}", user.name) } else { format!("USER ID {user_id} NOT EXISTS") } @@ -137,7 +137,11 @@ impl Fairing for Usage { let uri = req.uri().to_string(); - if !uri.ends_with(".css") && !uri.ends_with(".js") { + if !uri.ends_with(".css") + && !uri.ends_with(".js") + && !uri.ends_with(".ico") + && !uri.ends_with(".json") + { let config = req.rocket().state::().unwrap(); let Ok(mut file) = OpenOptions::new() .write(true) -- 2.45.2