fix: add api/v1/servers/uuid/channels/uuid as a service
This commit is contained in:
parent
c79451a851
commit
1de99306a2
3 changed files with 5 additions and 4 deletions
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -31,8 +31,9 @@ struct Role {
|
|||
|
||||
pub fn web() -> Scope {
|
||||
web::scope("")
|
||||
.service(channels::response)
|
||||
.service(res)
|
||||
.service(channels::response)
|
||||
.service(channels::uuid::res)
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue