From 43f8bcd9c810dd6ca5b756cc7816d778bb56879c Mon Sep 17 00:00:00 2001 From: Etienne Donneger <23462475+Krow10@users.noreply.github.com> Date: Sun, 15 Oct 2023 10:02:12 -0400 Subject: [PATCH] Fix rebase Code refactoring and comments (#16) --- src/schemas.ts | 4 ++++ src/tests/index.spec.ts | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/schemas.ts b/src/schemas.ts index bb818e5..0ee8f20 100644 --- a/src/schemas.ts +++ b/src/schemas.ts @@ -52,6 +52,8 @@ export const BlockchainSchema = z.object({ }) }); +// Represents the timestamp query parameter for `/{c}/timestamp?blocknum=` endpoint +// Supports array parsing via comma-separated values export const BlocknumSchema = z.object({ block_number: z.union([ z_blocknum, @@ -66,6 +68,8 @@ export const BlocknumSchema = z.object({ }) }); +// Represents the timestamp query parameter for `/{c}/blocknum?timestamp=` endpoint +// Supports array parsing via comma-separated values export const TimestampSchema = z.object({ timestamp: z.union([ z_timestamp, diff --git a/src/tests/index.spec.ts b/src/tests/index.spec.ts index a7e6a27..27184a6 100644 --- a/src/tests/index.spec.ts +++ b/src/tests/index.spec.ts @@ -2,7 +2,6 @@ import { describe, expect, it, beforeAll } from 'bun:test'; import { ZodError } from 'zod'; import config from '../config'; -import { generateApp } from '../index'; import { banner } from "../banner"; import { generateApp } from '../index'; import { supportedChainsQuery, timestampQuery } from "../queries";