Skip to content

Commit

Permalink
Change examples to new response format for Token endpoints (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
0237h authored Apr 29, 2024
1 parent 3f3fb77 commit c7799e1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/fetch/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { config } from "../config.js";
import { registry } from "../prometheus.js";
import { makeQuery } from "../clickhouse/makeQuery.js";
import { getBalanceChanges, getTotalSupply, getTransfers } from "../queries.js";
import { addMetadata } from "./utils.js";
const TAGS = {
MONITORING: "Monitoring",
HEALTH: "Health",
Expand All @@ -16,9 +17,9 @@ const timestampExamplesArrayFilter = ["greater_or_equals_by_timestamp", "greater
const blockExamplesArrayFilter = ["greater_or_equals_by_block", "greater_by_block", "less_or_equals_by_block", "less_by_block"];
const amountExamplesArrayFilter = ["amount_greater_or_equals", "amount_greater", "amount_less_or_equals", "amount_less"];

const supply_example = (await makeQuery(getTotalSupply(new URLSearchParams({ limit: "2" }), true))).data;
const balance_example = (await makeQuery(getBalanceChanges(new URLSearchParams({ limit: "2" }), true))).data;
const transfers_example = (await makeQuery(getTransfers(new URLSearchParams({ limit: "5" }), true))).data;
const supply_example = await makeQuery(getTotalSupply(new URLSearchParams({ limit: "2" }), true)).then(res => addMetadata(res, 2, 1));
const balance_example = await makeQuery(getBalanceChanges(new URLSearchParams({ limit: "2" }), true)).then(res => addMetadata(res, 2, 1));
const transfers_example = await makeQuery(getTransfers(new URLSearchParams({ limit: "5" }), true)).then(res => addMetadata(res, 5, 1));

const timestampSchema: SchemaObject = {
anyOf: [
Expand Down

0 comments on commit c7799e1

Please sign in to comment.