Skip to content

1563 enhance route checks for moment items#1620

Open
GoodKimchi wants to merge 4 commits into
OpenEnergyDashboard:developmentfrom
audreydng:1563-enhance-route-checks-for-moment-items
Open

1563 enhance route checks for moment items#1620
GoodKimchi wants to merge 4 commits into
OpenEnergyDashboard:developmentfrom
audreydng:1563-enhance-route-checks-for-moment-items

Conversation

@GoodKimchi
Copy link
Copy Markdown

Description

Closes #1563

This PR enhances route-level validation for time and duration inputs across relevant endpoints.

  • Added validation for timeInterval inputs
  • Centralized validation logic in util/timeValidation.js
  • Enforced strict ISO datetime and duration formats
  • Added test coverage for route parameter validation and time validation utilities
  • Ensured consistent validation across readings, unitReadings, logs, meters, and preferences routes

Type of change

  • Note merging this changes the database configuration.
  • This change requires a documentation update.

Checklist

  • I have followed the OED pull request ideas
  • I have removed text in () from the issue request
  • I acknowledge that every person contributing to this work has signed the OED Contributing License Agreement

Limitations

  • CSV pipeline changes were removed from this PR to keep scope aligned with route validation
  • Additional validation for non-route inputs can be handled in a separate issue

@huss
Copy link
Copy Markdown
Member

huss commented May 8, 2026

@GoodKimchi I'm sorry for the slow reply. Unfortunately, per a recent Discord msg, I won't be able to do a review for a number of days. I'm sorry about this.

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.

enhance route checks for moment items

3 participants