diff --git a/server/src/main.rs b/server/src/main.rs index 5072576..0256b6b 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -45,7 +45,7 @@ async fn route_dispatcher(pool: &Pool, resp: &mut Response, meth: &Method, *resp.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; } }, - (&Method::POST, routes::CHANNELS_LIST) => channels::list_channels(pool, resp).await, + (&Method::GET, routes::CHANNELS_LIST) => channels::list_channels(pool, resp).await, (&Method::POST, routes::CHANNELS_CREATE) => channels::create_channel(pool, resp, params).await, (&Method::POST, routes::MESSAGE_SEND) => messages::send_message(pool, resp, params).await, @@ -85,7 +85,10 @@ async fn main_responder(request: Request) -> Result, hyper: // Deal with permissions errors at this point match auth_result { OpenAuth | Good => route_dispatcher(&pool, &mut response, &method, path, params).await, - NoKey => *response.status_mut() = StatusCode::UNAUTHORIZED, + NoKey => { + println!("AUTH: NoKey/BadKey"); + *response.status_mut() = StatusCode::UNAUTHORIZED + }, } } else {