Change the authentication address to /auth

This commit is contained in:
Valentin Tolmer 2021-05-20 17:41:30 +02:00
parent d5cb53ae8a
commit 6cb06b0e9f
2 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ impl HostService {
request: BindRequest,
callback: Callback<Result<String>>,
) -> Result<FetchTask> {
let url = "/api/authorize";
let url = "/auth";
let handler = move |response: Response<Result<String>>| {
let (meta, maybe_data) = response.into_parts();
let message = maybe_data

View File

@ -262,8 +262,8 @@ fn http_config<Backend>(
"/{filename:(index\\.html|main\\.js)?}",
web::get().to(index),
)
.service(web::resource("/api/authorize").route(web::post().to(post_authorize::<Backend>)))
.service(web::resource("/api/authorize/refresh").route(web::get().to(get_refresh::<Backend>)))
.service(web::resource("/auth").route(web::post().to(post_authorize::<Backend>)))
.service(web::resource("/auth/refresh").route(web::get().to(get_refresh::<Backend>)))
// API endpoint.
.service(
web::scope("/api")