diff --git a/src/crud.js b/src/crud.js index 32cc61a..1f02710 100644 --- a/src/crud.js +++ b/src/crud.js @@ -214,6 +214,8 @@ export const scope = ({ server, model, prefix = '/', config }) => { include, where, limit, offset, order, }); + if (!list.length) return void reply(notFound('Nothing found.')); + reply(list.map((item) => item.toJSON())); }, config,