Semaphore/lib/routes/profile.js

13 lines
230 B
JavaScript
Raw Normal View History

2014-08-24 23:00:05 +02:00
exports.router = function (app, template) {
app.get('/profile', getProfile)
}
function getProfile (req, res) {
res.send({
_id: req.user._id,
name: req.user.name,
username: req.user.username,
email: req.user.email
})
}