(req, res)
| 48 | } |
| 49 | |
| 50 | const getPPAByTeam = async (req, res) => { |
| 51 | try { |
| 52 | if (!req.query.year && !req.query.team) { |
| 53 | res.status(400).send({ |
| 54 | error: 'year or team are required' |
| 55 | }); |
| 56 | } else if (req.query.year && !parseInt(req.query.year)) { |
| 57 | res.status(400).send({ |
| 58 | error: 'year must be numeric' |
| 59 | }); |
| 60 | } else { |
| 61 | const results = await service.getPPAByTeam(req.query.year, req.query.team, req.query.conference, req.query.excludeGarbageTime); |
| 62 | res.send(results); |
| 63 | } |
| 64 | } catch (err) { |
| 65 | Sentry.captureException(err); |
| 66 | res.status(500).send({ |
| 67 | error: 'Something went wrong.' |
| 68 | }); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | const getPPAByGame = async (req, res) => { |
| 73 | try { |
nothing calls this directly
no outgoing calls
no test coverage detected