Fix hooks example

This commit is contained in:
Ben Haynes
2020-10-23 09:23:47 -04:00
parent a8d4ba55c1
commit e6f968b63e

View File

@@ -148,7 +148,7 @@ module.exports = function registerHook({ services, exceptions }) {
return {
// Force everything to be admin-only at all times
'items.*.*': async function({ item, accountability }) {
'items.*': async function({ item, accountability }) {
if (accountability.admin !== true) throw new ForbiddenException();
},
// Sync with external recipes service, cancel creation on failure