(req, res, next)
| 193 | } |
| 194 | } |
| 195 | async getAdminCount(req, res, next){ |
| 196 | try{ |
| 197 | const count = await AdminModel.count() |
| 198 | res.send({ |
| 199 | status: 1, |
| 200 | count, |
| 201 | }) |
| 202 | }catch(err){ |
| 203 | console.log('获取管理员数量失败', err); |
| 204 | res.send({ |
| 205 | status: 0, |
| 206 | type: 'ERROR_GET_ADMIN_COUNT', |
| 207 | message: '获取管理员数量失败' |
| 208 | }) |
| 209 | } |
| 210 | } |
| 211 | async getAdminInfo(req, res, next){ |
| 212 | const admin_id = req.session.admin_id; |
| 213 | if (!admin_id || !Number(admin_id)) { |
nothing calls this directly
no outgoing calls
no test coverage detected