WIP: servers and channels #9

Draft
radical wants to merge 28 commits from wip/messaging into main
3 changed files with 5 additions and 4 deletions
Showing only changes of commit 1de99306a2 - Show all commits

View file

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

View file

@ -8,7 +8,7 @@ use log::error;
use super::Channel; use super::Channel;
#[get("{uuid}/channels/{channel_uuid}")] #[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 headers = req.headers();
let auth_header = get_auth_header(headers); let auth_header = get_auth_header(headers);

View file

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