Skip to content

Commit

Permalink
improve prepare entry param validation
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGoodall committed Dec 17, 2024
1 parent 9526580 commit 9217b16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middleware/entryIssueDetails.middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const setRecordCount = (req, res, next) => {
export const prepareEntry = (req, res, next) => {
const { resources, entryIssues } = req

if (!entryIssues[0] || !resources) {
if (!entryIssues || entryIssues.length === 0 || !resources || resources.length === 0) {
const error = new Error('Missing required values on request object')
error.status = 404
return next(error)
Expand Down

0 comments on commit 9217b16

Please sign in to comment.