mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-28 16:49:58 -07:00
website: big snapshot + cleanup
This commit is contained in:
@@ -6,7 +6,7 @@ use aide::{
|
||||
};
|
||||
use axum::{
|
||||
Extension,
|
||||
http::HeaderMap,
|
||||
http::{HeaderMap, header},
|
||||
response::{Html, Redirect, Response},
|
||||
routing::get,
|
||||
};
|
||||
@@ -83,6 +83,9 @@ impl ApiRoutes for ApiRouter<AppState> {
|
||||
),
|
||||
)
|
||||
.route("/api", get(Html::from(include_str!("./scalar.html"))))
|
||||
.route("/scalar.js", get(|| async {
|
||||
([(header::CONTENT_TYPE, "application/javascript")], include_str!("./scalar.js"))
|
||||
}))
|
||||
.route(
|
||||
"/api/{*path}",
|
||||
get(|| async { Redirect::permanent("/api") }),
|
||||
|
||||
Reference in New Issue
Block a user