Skip to content

Commit

Permalink
change path to get metrics to match changes in that project
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-verida committed Jul 7, 2023
1 parent e3d6c55 commit b2b110b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,13 @@ export default defineComponent({
// Request data using D3
const cachebreak = new Date().getTime();
csv(`https://assets.verida.io/metrics/stats.csv?cb=${cachebreak}`).then(
(value) => {
// d3 is poorly typed and doesn't allow overriding the generic type for the returned data. It is forced as 'string' while it's clearly an object, so have to cast it.
// A better option would be to validate the data with Zod and infer the type from it.
this.handleStatsData(value as unknown as RawData);
}
);
csv(
`https://assets.verida.io/metrics/network/testnet/stats.csv?cb=${cachebreak}`
).then((value) => {
// d3 is poorly typed and doesn't allow overriding the generic type for the returned data. It is forced as 'string' while it's clearly an object, so have to cast it.
// A better option would be to validate the data with Zod and infer the type from it.
this.handleStatsData(value as unknown as RawData);
});
},
});
</script>

0 comments on commit b2b110b

Please sign in to comment.