(req, res)
| 4 | const service = await serviceConstructor(db); |
| 5 | |
| 6 | const getPlays = async (req, res) => { |
| 7 | try { |
| 8 | if (!req.query.id && !parseInt(req.query.id)) { |
| 9 | res.status(400).send({ |
| 10 | error: 'A numeric game id is required.' |
| 11 | }); |
| 12 | } else { |
| 13 | let results = await service.getPlays(req.query.id); |
| 14 | res.send(results); |
| 15 | } |
| 16 | } catch (err) { |
| 17 | Sentry.captureException(err); |
| 18 | res.status(500).send({ |
| 19 | error: 'Something went wrong.' |
| 20 | }); |
| 21 | } |
| 22 | }; |
| 23 | |
| 24 | return { |
| 25 | getPlays |
nothing calls this directly
no outgoing calls
no test coverage detected