fix: URL query validation

This commit is contained in:
Yarmo Mackenbach 2024-01-23 19:47:33 +01:00
parent e0d47e5247
commit ee55c50a1a
No known key found for this signature in database
GPG key ID: C248C28D432560ED

View file

@ -110,7 +110,7 @@ router.get('/aspe', query('aspeUri').isString(), (req, res) => {
}) })
// OpenPGP route // OpenPGP route
router.get('/openpgp', query('url').isFQDN(), query('protocol').isString(), (req, res) => { router.get('/openpgp', query('url').isURL(), query('protocol').isString(), (req, res) => {
const errors = validationResult(req) const errors = validationResult(req)
if (!errors.isEmpty()) { if (!errors.isEmpty()) {
return res.status(400).json({ errors: errors.array() }) return res.status(400).json({ errors: errors.array() })