style: cargo fmt & clippy fixes
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful

This commit is contained in:
Radical 2025-07-20 16:30:46 +02:00
parent 969b517e18
commit a602c2624f
29 changed files with 216 additions and 86 deletions

View file

@ -3,11 +3,18 @@
use std::sync::Arc;
use crate::{
api::v1::auth::CurrentUser, error::Error, objects::{Channel, Member}, utils::global_checks, AppState
AppState,
api::v1::auth::CurrentUser,
error::Error,
objects::{Channel, Member},
utils::global_checks,
};
use ::uuid::Uuid;
use axum::{
extract::{Path, Query, State}, http::StatusCode, response::IntoResponse, Extension, Json
Extension, Json,
extract::{Path, Query, State},
http::StatusCode,
response::IntoResponse,
};
use serde::Deserialize;

View file

@ -13,7 +13,10 @@ use crate::{
utils::global_checks,
};
use axum::{
extract::{Path, State}, http::StatusCode, response::IntoResponse, Extension, Json
Extension, Json,
extract::{Path, State},
http::StatusCode,
response::IntoResponse,
};
use serde::Deserialize;
@ -42,7 +45,9 @@ pub async fn delete(
let channel = Channel::fetch_one(&app_state, channel_uuid).await?;
let member = Member::check_membership(&mut app_state.pool.get().await?, uuid, channel.guild_uuid).await?;
let member =
Member::check_membership(&mut app_state.pool.get().await?, uuid, channel.guild_uuid)
.await?;
member
.check_permission(&app_state, Permissions::ManageChannel)
@ -101,7 +106,9 @@ pub async fn patch(
let mut channel = Channel::fetch_one(&app_state, channel_uuid).await?;
let member = Member::check_membership(&mut app_state.pool.get().await?, uuid, channel.guild_uuid).await?;
let member =
Member::check_membership(&mut app_state.pool.get().await?, uuid, channel.guild_uuid)
.await?;
member
.check_permission(&app_state, Permissions::ManageChannel)