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

This commit is contained in:
Radical 2025-05-30 21:17:30 +02:00
parent c9a3e8c6c4
commit d615f1392e
31 changed files with 288 additions and 181 deletions

View file

@ -1,7 +1,11 @@
//! `/api/v1/channels/{uuid}/messages` Endpoints related to channel messages
use crate::{
api::v1::auth::check_access_token, error::Error, structs::{Channel, Member}, utils::{get_auth_header, global_checks}, Data
Data,
api::v1::auth::check_access_token,
error::Error,
structs::{Channel, Member},
utils::{get_auth_header, global_checks},
};
use ::uuid::Uuid;
use actix_web::{HttpRequest, HttpResponse, get, web};
@ -14,11 +18,11 @@ struct MessageRequest {
}
/// `GET /api/v1/channels/{uuid}/messages` Returns user with the given UUID
///
///
/// requires auth: yes
///
///
/// requires relation: yes
///
///
/// ### Request Example
/// ```
/// json!({
@ -26,7 +30,7 @@ struct MessageRequest {
/// "offset": 0
/// })
/// ```
///
///
/// ### Response Example
/// ```
/// json!({
@ -42,7 +46,7 @@ struct MessageRequest {
/// }
/// });
/// ```
///
///
#[get("/{uuid}/messages")]
pub async fn get(
req: HttpRequest,