(req, res)
| 28 | }; |
| 29 | |
| 30 | const getPicks = async (req, res) => { |
| 31 | try { |
| 32 | if (req.query.year && isNaN(req.query.year)) { |
| 33 | res.status(400).send({ |
| 34 | error: 'Year param must be numeric' |
| 35 | }); |
| 36 | } else { |
| 37 | let picks = await service.getPicks(req.query.year, req.query.nflTeam, req.query.college, req.query.conference, req.query.position); |
| 38 | res.send(picks); |
| 39 | } |
| 40 | } catch (err) { |
| 41 | Sentry.captureException(err); |
| 42 | res.status(500).send({ |
| 43 | error: 'Something went wrong.' |
| 44 | }); |
| 45 | } |
| 46 | }; |
| 47 | |
| 48 | return { |
| 49 | getTeams, |
nothing calls this directly
no outgoing calls
no test coverage detected