Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): Improve block range validation in POI endpoint #2645

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

VolodymyrBg
Copy link

Description

Improves block range validation in the POI endpoint by implementing proper class-validator decorators. The change replaces manual validation with a custom IsGreaterThan decorator that ensures endBlock is always greater than startBlock when provided. This makes the validation more robust and consistent with the rest of the codebase's validation patterns.

Fixes #[issue_number] (if there is a related issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Changes made

  • Added custom IsGreaterThan validation decorator
  • Removed manual validation in the controller
  • Fixed TODO comment regarding class validator functionality
  • Improved type safety for block range validation

Checklist

  • I have tested locally
  • I have performed a self review of my changes
  • Updated any relevant documentation
  • Linked to any relevant issues
  • I have added tests relevant to my changes
  • Any dependent changes have been merged and published in downstream modules
  • My code is up to date with the base branch
  • I have updated relevant changelogs

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.

1 participant