I generated an api building
using sails command line and now I would like to customize logic inside route /building
. I checked sails source code to replicate the basic behaviour of find
action with my customizations.
I saw that the very convenient library actionUtil is used to perform this action and I would like to reuse this file in my controller. How can I do that ?
My final goal is just to display buildings which user has access to, if you have a better idea than replicate sails source code, I'm in !
Thanks
You can import it in your controller or wherever you need it with just specifying full path for e.g
var actionUtil = require('sails/lib/hooks/blueprints/actionUtil');
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments