style: cargo clippy && format
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
This commit is contained in:
parent
860fa7a66e
commit
8605b81e7b
26 changed files with 274 additions and 178 deletions
|
@ -1,8 +1,14 @@
|
|||
use actix_web::{put, web, HttpRequest, HttpResponse};
|
||||
use uuid::Uuid;
|
||||
use actix_web::{HttpRequest, HttpResponse, put, web};
|
||||
use futures_util::StreamExt as _;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::{error::Error, api::v1::auth::check_access_token, structs::{Guild, Member}, utils::get_auth_header, Data};
|
||||
use crate::{
|
||||
Data,
|
||||
api::v1::auth::check_access_token,
|
||||
error::Error,
|
||||
structs::{Guild, Member},
|
||||
utils::get_auth_header,
|
||||
};
|
||||
|
||||
#[put("{uuid}/icon")]
|
||||
pub async fn upload(
|
||||
|
@ -30,7 +36,14 @@ pub async fn upload(
|
|||
bytes.extend_from_slice(&item?);
|
||||
}
|
||||
|
||||
guild.set_icon(&data.bunny_cdn, &mut conn, data.config.bunny.cdn_url.clone(), bytes).await?;
|
||||
guild
|
||||
.set_icon(
|
||||
&data.bunny_cdn,
|
||||
&mut conn,
|
||||
data.config.bunny.cdn_url.clone(),
|
||||
bytes,
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(HttpResponse::Ok().finish())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue