Remove warning where clause

This commit is contained in:
Aurelsicoko 2018-05-09 15:11:55 +02:00
parent 9d8cd3f620
commit 02a2e087cc
2 changed files with 7 additions and 4 deletions

View File

@ -123,6 +123,6 @@ module.exports = async cb => {
await pluginStore.set({key: 'advanced', value});
}
strapi.plugins['users-permissions'].services.userspermissions.initialize(cb);
};

View File

@ -138,10 +138,13 @@ module.exports = {
},
removePermission: async function (params) {
const value = params[this.primaryKey] ? {
[this.primaryKey]: params[this.primaryKey] || params.id
} : params;
return this
.forge({
[this.primaryKey]: params[this.primaryKey] || params.id
})
.forge()
.where(value)
.destroy();
}
};