mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user