Skip to content

Commit bfa3a28

Browse files
committed
Changes while reviewing and testing
1 parent 5337622 commit bfa3a28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ const validateContentType = function (req, res, next) {
5858
if (mimeType === "application/json" || mimeType === "application/ld+json") return next()
5959
const isSearchEndpoint = req.path === "/search" || req.path.startsWith("/search/")
6060
if (mimeType === "text/plain" && isSearchEndpoint) return next()
61-
const acceptedTypes = `"application/json" or "application/ld+json"${isSearchEndpoint ? ' or "text/plain"' : ''}`
61+
const acceptedTypes = `application/json or application/ld+json${isSearchEndpoint ? ' or text/plain' : ''}`
6262
next(createExpressError({
6363
statusCode: 415,
64-
statusMessage: `Unsupported Content-Type: "${contentType}". This endpoint requires ${acceptedTypes}.`
64+
statusMessage: `Unsupported Content-Type: ${contentType}. This endpoint requires ${acceptedTypes}.`
6565
}))
6666
}
6767

0 commit comments

Comments
 (0)