Commit 08c764f6 authored by 陈家荣's avatar 陈家荣

增加了获取单用户的接口

parent e6c097a9
......@@ -69,3 +69,28 @@ router.post('/member/searchMembers', function(req, res, next) {
});
}
});
//获取单用户
router.get('/member/:mid/get', function(req, res, next) {
var mid = req.params.mid || null;
if (mid) {
forumUserService.getUserById(mid, function(err, user) {
if (err) {
console.error(err);
res.json(returnCode.BUSY);
} else {
var obj = {
result : true,
data : user
}
res.json(obj);
}
});
} else {
console.error('params error');
res.json({
result: false,
err: 'params error'
});
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment