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