Merge pull request #3544 from dugi-x/patch-1

Update Full Example
This commit is contained in:
Rijk van Zanten
2020-12-30 14:03:19 -05:00
committed by GitHub

View File

@@ -61,9 +61,8 @@ module.exports = function registerEndpoint(router, { services, exceptions }) {
const { ItemsService } = services;
const { ServiceUnavailableException } = exceptions;
const recipeService = new ItemsService('recipes');
router.get('/', (req, res) => {
const recipeService = new ItemsService('recipes', { schema: req.schema });
recipeService
.readByQuery({ sort: 'name', fields: '*' })
.then((results) => res.json(results))