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

Method apiAllCount

controller/statis/statis.js:39–54  ·  view source on GitHub ↗
(req, res, next)

Source from the content-addressed store, hash-verified

37 }
38 }
39 async apiAllCount(req, res, next){
40 try{
41 const count = await StatisModel.count()
42 res.send({
43 status: 1,
44 count,
45 })
46 }catch(err){
47 console.log('获取所有API请求次数失败');
48 res.send({
49 status: 0,
50 type: 'ERROR_GET_ALL_API_COUNT',
51 message: '获取所有API请求次数失败'
52 })
53 }
54 }
55 async allApiRecord(req, res, next){
56 try{
57 const allRecord = await StatisModel.find({}, '-_id -__v')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected