Skip to content

Conversation

@rahmandawibowo-vito
Copy link
Collaborator

@rahmandawibowo-vito rahmandawibowo-vito commented Oct 21, 2025

Issue Ref: #18

New APIs are introduced for benchmark date filtering. The authorization logic will be added in a separated PR.

GET /api/admin/services/benchmarks.json

GET /api/admin/services/{id}/benchmarks.json

@rahmandawibowo-vito rahmandawibowo-vito changed the title Create API for benchmark date filter Create API for benchmark admin with date filter Oct 21, 2025
const startDateParam = url.searchParams.get("start") || undefined;
const endDateParam = url.searchParams.get("end") || undefined;

const dateValidation = validateDateParameters(startDateParam, endDateParam);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of this code is duplicated in the other endpoint. Maybe we can create some helper functions to ensure the same logic is properly applied?

Copy link
Collaborator Author

@rahmandawibowo-vito rahmandawibowo-vito Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have moved the duplicated logic to lib/parquet-datasource.ts in this commit , I think the file is suitable to contain such logic. 51d8b9c. Wdyt?

@rahmandawibowo-vito rahmandawibowo-vito merged commit 4512a6b into main Oct 28, 2025
5 checks passed
@rahmandawibowo-vito rahmandawibowo-vito deleted the benchmark-date-filter branch October 28, 2025 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants