Improve UI (#3)

Co-authored-by: Gregório Granado Magalhães <greg.magalhaes@gmail.com>
This commit is contained in:
Simon Bihel
2021-12-17 15:02:07 +00:00
committed by GitHub
parent 004ca9e764
commit 0287a60296
15 changed files with 32517 additions and 23541 deletions

View File

@@ -240,7 +240,7 @@ async fn token(
.await
.map_err(|e| anyhow!("Failed to set kv: {}", e))?;
let access_token = AccessToken::new(form.code.clone());
let access_token = AccessToken::new(form.code.to_string().clone());
let core_id_token = CoreIdTokenClaims::new(
IssuerUrl::from_url(config.base_url),
vec![Audience::new(form.client_id.clone())],
@@ -658,6 +658,17 @@ async fn main() {
},
),
)
.nest(
"/img",
service_method_routing::get(ServeDir::new("./static/img")).handle_error(
|error: std::io::Error| {
(
StatusCode::INTERNAL_SERVER_ERROR,
format!("Unhandled internal error: {}", error),
)
},
),
)
.route(
"/",
service_method_routing::get(ServeFile::new("./static/index.html")).handle_error(