global: MASSIVE snapshot

This commit is contained in:
nym21
2026-02-23 17:22:12 +01:00
parent be0d749f9c
commit 3b7aa8242a
703 changed files with 29130 additions and 30779 deletions
+2 -2
View File
@@ -167,7 +167,7 @@ impl ApiMetricsRoutes for ApiRouter<AppState> {
.summary("Get supported indexes for a metric")
.description(
"Returns the list of indexes supported by the specified metric. \
For example, `realized_price` might be available on dateindex, weekindex, and monthindex."
For example, `realized_price` might be available on day1, week1, and month1."
)
.ok_response::<Vec<Index>>()
.not_modified()
@@ -262,7 +262,7 @@ impl ApiMetricsRoutes for ApiRouter<AppState> {
.description(
"**DEPRECATED** - Use `/api/metric/{metric}/{index}` instead.\n\n\
Sunset date: 2027-01-01. May be removed earlier in case of abuse.\n\n\
Legacy endpoint for querying metrics by variant path (e.g., `dateindex_to_price`). \
Legacy endpoint for querying metrics by variant path (e.g., `day1_to_price`). \
Returns raw data without the MetricData wrapper."
)
.deprecated()
+8 -1
View File
@@ -83,8 +83,15 @@ impl ApiRoutes for ApiRouter<AppState> {
),
)
.route("/api", get(Html::from(include_str!("./scalar.html"))))
// Pre-compressed with: brotli -c -q 11 scalar.js > scalar.js.br
.route("/scalar.js", get(|| async {
([(header::CONTENT_TYPE, "application/javascript")], include_str!("./scalar.js"))
(
[
(header::CONTENT_TYPE, "application/javascript"),
(header::CONTENT_ENCODING, "br"),
],
include_bytes!("./scalar.js.br").as_slice(),
)
}))
.route(
"/api/{*path}",
+3
View File
@@ -22,6 +22,9 @@
telemetry: false,
withDefaultFonts: false,
// showToolbar: "never",
agent: {
disabled: true,
},
});
</script>
</body>
File diff suppressed because one or more lines are too long
Binary file not shown.
+2 -2
View File
@@ -3,7 +3,7 @@ use std::{borrow::Cow, fs, path};
use aide::axum::{ApiRouter, routing::get_with};
use axum::{extract::State, http::{HeaderMap, Uri}};
use brk_types::{DiskUsage, Health, Height, SyncStatus};
use vecdb::GenericStoredVec;
use vecdb::ReadableVec;
use crate::{CacheStrategy, extended::TransformResponseExtended};
@@ -31,7 +31,7 @@ impl ServerRoutes for ApiRouter<AppState> {
.vecs
.blocks
.timestamp
.read_once(indexed_height)?;
.collect_one(indexed_height).unwrap();
Ok(SyncStatus {
indexed_height,