Fix(crud) scope now 404s on no results

This commit is contained in:
Joey Baker 2016-10-28 11:20:59 -07:00
parent 6a2290f064
commit 11e6ff596c

View File

@ -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,