MCPcopy Create free account
hub / github.com/bailicangdu/node-elm / getUserCount

Method getUserCount

controller/v2/user.js:250–265  ·  view source on GitHub ↗
(req, res, next)

Source from the content-addressed store, hash-verified

248 }
249 }
250 async getUserCount(req, res, next){
251 try{
252 const count = await UserInfoModel.count();
253 res.send({
254 status: 1,
255 count,
256 })
257 }catch(err){
258 console.log('获取用户数量失败', err);
259 res.send({
260 status: 0,
261 type: 'ERROR_TO_GET_USER_COUNT',
262 message: '获取用户数量失败'
263 })
264 }
265 }
266 async updateAvatar(req, res, next){
267 const sid = req.session.user_id;
268 const pid = req.params.user_id;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected