chore: switch Reference to using an actual reference

This commit is contained in:
Zomatree
2025-08-12 03:44:29 +01:00
parent 65fbd36624
commit ed22b3a5ce
76 changed files with 133 additions and 131 deletions
+2 -2
View File
@@ -13,9 +13,9 @@ use rocket::State;
pub async fn fetch_public_bot(
db: &State<Database>,
user: Option<User>,
target: Reference,
target: Reference<'_>,
) -> Result<Json<PublicBot>> {
let bot = db.fetch_bot(&target.id).await?;
let bot = db.fetch_bot(target.id).await?;
if !bot.public && user.is_none_or(|x| x.id != bot.owner) {
return Err(create_error!(NotFound));
}