Posts

Showing posts from 2017

route.get() requires callback functions but got a object undefined at route.(anonymous function)

I checked and tried similar questions like this,but didn't fix the issue.I'm getting route.get() requires callback functions but got a object undefined at route.(anonymous function) drug.server.policy.js 'use strict' ; /** * Module dependencies */ var acl = require ( 'acl' ); // Using the memory backend acl = new acl ( new acl . memoryBackend ()); /** * Invoke Drugs Permissions */ exports . invokeRolesPolicies = function () { acl . allow ([{ roles : [ 'admin' ], allows : [{ resources : '/api/drugs' , permissions : '*' }, { resources : '/api/drugs/:drugId' , permissions : '*' }] }, { roles : [ 'user' ], allows : [{ resources : '/api/drugs' , permissions : [ 'get' , 'post' ]