CVEProject / cve-services

This repo contains the source for the CVE Services API.
Creative Commons Zero v1.0 Universal
150 stars 70 forks source link

Resolves #1163 Added datePublic validator with 24 hour grace period #1240

Closed jdaigneau5 closed 4 months ago

jdaigneau5 commented 4 months ago

Closes Issue #1163

Summary

Added a datePublic validator middleware that prevents records from being created or updated to have a datePublic more than 24 hours from the current time.

Important Changes

cve.middleware.js

Testing

Added unit test to test 24 hour grace period. Run npm run test:unit-tests