From 6cb06b0e9f200cf8f3fb4da375d9ce5d30c47f8c Mon Sep 17 00:00:00 2001 From: Valentin Tolmer Date: Thu, 20 May 2021 17:41:30 +0200 Subject: [PATCH] Change the authentication address to /auth --- app/src/api.rs | 2 +- src/infra/tcp_server.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/api.rs b/app/src/api.rs index 8856568..fd8f682 100644 --- a/app/src/api.rs +++ b/app/src/api.rs @@ -52,7 +52,7 @@ impl HostService { request: BindRequest, callback: Callback>, ) -> Result { - let url = "/api/authorize"; + let url = "/auth"; let handler = move |response: Response>| { let (meta, maybe_data) = response.into_parts(); let message = maybe_data diff --git a/src/infra/tcp_server.rs b/src/infra/tcp_server.rs index 209c33f..2bb8196 100644 --- a/src/infra/tcp_server.rs +++ b/src/infra/tcp_server.rs @@ -262,8 +262,8 @@ fn http_config( "/{filename:(index\\.html|main\\.js)?}", web::get().to(index), ) - .service(web::resource("/api/authorize").route(web::post().to(post_authorize::))) - .service(web::resource("/api/authorize/refresh").route(web::get().to(get_refresh::))) + .service(web::resource("/auth").route(web::post().to(post_authorize::))) + .service(web::resource("/auth/refresh").route(web::get().to(get_refresh::))) // API endpoint. .service( web::scope("/api")