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

Method getAdminCount

controller/admin/admin.js:195–210  ·  view source on GitHub ↗
(req, res, next)

Source from the content-addressed store, hash-verified

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)) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected