(req, res, next)
| 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; |
nothing calls this directly
no outgoing calls
no test coverage detected