Skip to content

Instantly share code, notes, and snippets.

@robwormald
Created January 19, 2014 20:02
Show Gist options
  • Save robwormald/8510237 to your computer and use it in GitHub Desktop.
Save robwormald/8510237 to your computer and use it in GitHub Desktop.
api : function(req,res){
var _modelKeys = Object.keys(sails.models)
var _models = []
async.forEach(_modelKeys,function(key,done){
var _model = {
_model : key,
_attributes : sails.models[key]._attributes
}
_models.push(_model)
done()
},function(err){
res.json(_models)
})
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment