Skip to content

Instantly share code, notes, and snippets.

@mickhansen
Last active December 22, 2015 22:49
Show Gist options
  • Save mickhansen/6542921 to your computer and use it in GitHub Desktop.
Save mickhansen/6542921 to your computer and use it in GitHub Desktop.
var _ = require('lodash');
sequelize.User.findAll().done(function (err, users) {
if (err) return res.json(403, {err: err.toString()});
res.json(200, users.map(function (user) {
return _.omit(user.toJSON(), ['password']);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment