diff options
Diffstat (limited to 'models/users.js')
-rw-r--r-- | models/users.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/models/users.js b/models/users.js index aa870dca..55d0095e 100644 --- a/models/users.js +++ b/models/users.js @@ -527,6 +527,16 @@ if (Meteor.isServer) { // USERS REST API if (Meteor.isServer) { + JsonRoutes.add('GET', '/api/user', function(req, res, next) { + Authentication.checkLoggedIn(req.userId); + let data = Meteor.users.findOne({ _id: req.userId}); + delete data.services; + JsonRoutes.sendResult(res, { + code: 200, + data + }); + }); + JsonRoutes.add('GET', '/api/users', function (req, res, next) { Authentication.checkUserId( req.userId); JsonRoutes.sendResult(res, { |