Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

Commit 9d452f1

Browse files
author
Nikolas Haimerl
committed
fix clients path
1 parent d14bf6d commit 9d452f1

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

observablehq.config.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
import { jsonFetcher } from './src/data/json-fetcher.js'
22
import { getDateXDaysAgo } from './src/utils/date-utils.js'
33

4-
const start = '2024-04-07'
4+
const startProviders = '2024-04-07'
5+
const startClients = '2025-02-25'
56
const end = getDateXDaysAgo(1)
67

7-
const result = await jsonFetcher(
8-
`https://stats.filspark.com/miners/retrieval-success-rate/summary?from=${start}&to=${end}`,
8+
const providersSummary = await jsonFetcher(
9+
`https://stats.filspark.com/miners/retrieval-success-rate/summary?from=${startProviders}&to=${end}`,
910
)
10-
const providerPaths = result.map((provider) => `/provider/${provider.miner_id}`)
11-
11+
const clientsSummary= await jsonFetcher(
12+
`https://stats.filspark.com/clients/retrieval-success-rate/summary?from=${startClients}&to=${end}`,
13+
)
14+
const providerPaths = providersSummary.map((provider) => `/provider/${provider.miner_id}`)
15+
const clientPaths = clientsSummary.map((client) => `/client/${client.client_id}`)
1216
// See https://observablehq.com/framework/config for documentation.
1317
export default {
1418
// The app’s title; used in the sidebar and webpage titles.
@@ -45,5 +49,5 @@ export default {
4549
// linkify: true, // convert URLs in Markdown to links
4650
// typographer: false, // smart quotes and other typographic improvements
4751
// cleanUrls: true, // drop .html from URLs
48-
dynamicPaths: providerPaths,
52+
dynamicPaths: [...providerPaths, ...clientPaths],
4953
}

0 commit comments

Comments
 (0)