dont clutter logs
This commit is contained in:
parent
8771a378da
commit
0cd623482c
@ -125,7 +125,7 @@ impl Fairing for Usage {
|
|||||||
Ok(user_id) => {
|
Ok(user_id) => {
|
||||||
let db = req.rocket().state::<SqlitePool>().unwrap();
|
let db = req.rocket().state::<SqlitePool>().unwrap();
|
||||||
if let Some(user) = User::find_by_id(db, user_id).await {
|
if let Some(user) = User::find_by_id(db, user_id).await {
|
||||||
user.name
|
format!("User: {}", user.name)
|
||||||
} else {
|
} else {
|
||||||
format!("USER ID {user_id} NOT EXISTS")
|
format!("USER ID {user_id} NOT EXISTS")
|
||||||
}
|
}
|
||||||
@ -137,7 +137,11 @@ impl Fairing for Usage {
|
|||||||
|
|
||||||
let uri = req.uri().to_string();
|
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::<Config>().unwrap();
|
let config = req.rocket().state::<Config>().unwrap();
|
||||||
let Ok(mut file) = OpenOptions::new()
|
let Ok(mut file) = OpenOptions::new()
|
||||||
.write(true)
|
.write(true)
|
||||||
|
Loading…
Reference in New Issue
Block a user