(req, res, next)
| 7 | |
| 8 | } |
| 9 | async getEntry(req, res, next){ |
| 10 | try{ |
| 11 | const entries = await EntryModel.find({}, '-_id'); |
| 12 | res.send(entries); |
| 13 | }catch(err){ |
| 14 | console.log('获取数据失败'); |
| 15 | res.send({ |
| 16 | status: 0, |
| 17 | type: 'ERROR_DATA', |
| 18 | message: '获取数据失败' |
| 19 | }) |
| 20 | return |
| 21 | } |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | export default new Entry() |
nothing calls this directly
no outgoing calls
no test coverage detected