fix: add api/v1/servers/uuid/channels/uuid as a service

This commit is contained in:
Radical 2025-05-08 00:03:18 +02:00
parent c79451a851
commit 1de99306a2
3 changed files with 5 additions and 4 deletions

View file

@ -7,7 +7,7 @@ use crate::{api::v1::auth::check_access_token, utils::get_auth_header, Data};
use ::uuid::Uuid;
use log::error;
mod uuid;
pub mod uuid;
#[derive(Serialize, Clone, FromRow)]
struct ChannelPermission {

View file

@ -8,7 +8,7 @@ use log::error;
use super::Channel;
#[get("{uuid}/channels/{channel_uuid}")]
pub async fn response(req: HttpRequest, path: web::Path<(Uuid, Uuid)>, data: web::Data<Data>) -> Result<HttpResponse, Error> {
pub async fn res(req: HttpRequest, path: web::Path<(Uuid, Uuid)>, data: web::Data<Data>) -> Result<HttpResponse, Error> {
let headers = req.headers();
let auth_header = get_auth_header(headers);

View file

@ -31,8 +31,9 @@ struct Role {
pub fn web() -> Scope {
web::scope("")
.service(channels::response)
.service(res)
.service(res)
.service(channels::response)
.service(channels::uuid::res)
}