Created
April 15, 2016 11:28
-
-
Save andrewjmead/aaa23774be1dc9fc41cbc861e17056a8 to your computer and use it in GitHub Desktop.
Seth GET /user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get('/user', function(req, res) { | |
db.user.findAll().then(function(user) { | |
res.json(user.toPublicJSON()); | |
}), | |
function(e) { | |
res.status(500).send(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment