diff --git a/crates/app/src/public/html/economy/wallet.lisp b/crates/app/src/public/html/economy/wallet.lisp index 8227bcb..0981f09 100644 --- a/crates/app/src/public/html/economy/wallet.lisp +++ b/crates/app/src/public/html/economy/wallet.lisp @@ -38,7 +38,7 @@ (icon (text "clock")) (span (str (text "economy:label.recent_transfers"))))) (div - ("class" "card lowered flex flex_col gap_4") + ("class" "card flex flex_col gap_4") (div ("class" "w_full") ("style" "overflow: auto") diff --git a/crates/app/src/routes/api/v1/ads.rs b/crates/app/src/routes/api/v1/ads.rs index aba8682..15c80bd 100644 --- a/crates/app/src/routes/api/v1/ads.rs +++ b/crates/app/src/routes/api/v1/ads.rs @@ -104,7 +104,12 @@ pub async fn update_is_running_request( None => return Json(Error::NotAllowed.into()), }; - if user.coins < 50 { + let ad = match data.get_ad_by_id(id).await { + Ok(x) => x, + Err(e) => return Json(e.into()), + }; + + if !ad.is_running && user.coins < 50 { return Json( Error::MiscError( "You must have a minimum of 50 coins in your balance to run ads".to_string(), diff --git a/crates/core/src/database/ads.rs b/crates/core/src/database/ads.rs index 03d0936..cb6463a 100644 --- a/crates/core/src/database/ads.rs +++ b/crates/core/src/database/ads.rs @@ -228,12 +228,12 @@ impl DataManager { let ad = self.get_ad_by_id(ad).await?; if let Some(ref ua) = user { - if ua.id == ad.owner || ua.id == host { + if ua.id == host { self.create_user_warning( UserWarning::new( ua.id, self.0.0.system_user, - "Automated warning: do not click on ads on your own site OR click on your own ads! This incident has been reported.".to_string() + "Automated warning: do not click on ads on your own site! This incident has been reported.".to_string() ) ).await?;