chore: sync branch with main

This commit is contained in:
Zomatree
2025-08-18 02:14:36 +01:00
parent 14ea180683
commit 67773d3e43
4 changed files with 5 additions and 5 deletions

View File

@@ -38,7 +38,7 @@ pub async fn edit_bot(
&& data.analytics.is_none()
&& data.interactions_url.is_none()
&& data.oauth2.is_none()
&& data.remove.is_none()
&& data.remove.is_empty()
{
return Ok(Json(v0::BotWithUserResponse {
bot: bot.into(),

View File

@@ -21,7 +21,7 @@ pub async fn auth(
return Err(create_error!(IsBot));
};
let bot = Reference::from_unchecked(info.client_id.clone())
let bot = Reference::from_unchecked(&info.client_id)
.as_bot(db)
.await?;

View File

@@ -17,8 +17,8 @@ pub async fn info(
return Err(create_error!(IsBot));
};
let bot = Reference::from_unchecked(info.client_id.to_string()).as_bot(db).await?;
let bot_user = Reference::from_unchecked(bot.id.clone()).as_user(db).await?;
let bot = Reference::from_unchecked(&info.client_id).as_bot(db).await?;
let bot_user = Reference::from_unchecked(&bot.id).as_user(db).await?;
let public_bot = bot.clone().into_public_bot(bot_user);
let Some(oauth2) = &bot.oauth2 else {

View File

@@ -20,7 +20,7 @@ pub async fn token(
db: &State<Database>,
info: Form<v0::OAuth2TokenExchangeForm>,
) -> Result<Json<v0::OAuth2TokenExchangeResponse>> {
let bot = Reference::from_unchecked(info.client_id.clone())
let bot = Reference::from_unchecked(&info.client_id)
.as_bot(db)
.await?;