resource-action-api
Advanced tools
Comparing version 2.1.10 to 2.1.11
{ | ||
"name": "resource-action-api", | ||
"version": "2.1.10", | ||
"version": "2.1.11", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,6 +7,6 @@ var {singularize, pluralize} = require('inflection'); | ||
class Executor { | ||
constructor({resourceKey, actionKey, params={}, options}, {user}={}) { | ||
constructor({resourceKey, actionKey, params={}, options}) { | ||
params = _.cloneDeep(params); | ||
options = _.defaults(options, {useMiddleware: true, shouldLog: true, deepInclude: false}); | ||
console.log('user', user); | ||
if (user) this.user = options.user = user; | ||
@@ -13,0 +13,0 @@ |
@@ -37,4 +37,4 @@ const auth = require('../../lib/auth/auth'); | ||
}); | ||
//TODO has permission on each include | ||
console.log('resources'); | ||
if (hasPermission) { | ||
@@ -44,3 +44,2 @@ var getResourceData; | ||
if (schemas[singularize(resourceKey)]) { | ||
console.log('user', user); | ||
getResourceData = () => db.execute({actionKey, resourceKey, params}, {source: '/resources', logs, user, files}); | ||
@@ -47,0 +46,0 @@ } |
85522
1762