Return on unprotected services
This commit is contained in:
@@ -8,9 +8,8 @@ module.exports = {
|
|||||||
model: "inferred"
|
model: "inferred"
|
||||||
},
|
},
|
||||||
create: function (context) {
|
create: function (context) {
|
||||||
const services = context.getModel().services;
|
const services = context.getModel() ? context.getModel().services : [];
|
||||||
const unprotectedServices = services.filter(s => !s["@requires"] && !s["@restrict"]).map(s => s.name)
|
const unprotectedServices = services.filter(s => !s["@requires"] && !s["@restrict"]).map(s => s.name)
|
||||||
if (!unprotectedServices.length) return
|
|
||||||
return { entity: checkForExposedFields };
|
return { entity: checkForExposedFields };
|
||||||
|
|
||||||
function checkForExposedFields(entity) {
|
function checkForExposedFields(entity) {
|
||||||
|
|||||||
Reference in New Issue
Block a user