Update api-endpoints.md (#4012)

Line 62, .readByQuery({ sort: 'name', fields: <needs to be an array> })
Added the array implementation as a string will fail.
This commit is contained in:
Pablo Zehle
2021-02-11 16:07:23 +01:00
committed by GitHub
parent cc38da1314
commit 8c1402fb88

View File

@@ -59,7 +59,7 @@ module.exports = function registerEndpoint(router, { services, exceptions }) {
router.get('/', (req, res) => {
const recipeService = new ItemsService('recipes', { schema: req.schema });
recipeService
.readByQuery({ sort: 'name', fields: '*' })
.readByQuery({ sort: 'name', fields: ['*'] })
.then((results) => res.json(results))
.catch((error) => {
throw new ServiceUnavailableException(error.message);