(req, res)
| 131 | }; |
| 132 | |
| 133 | const getTransferPortal = async (req, res) => { |
| 134 | try { |
| 135 | if (!req.query.year) { |
| 136 | res.status(400).send({ |
| 137 | error: 'year must be specified' |
| 138 | }); |
| 139 | } else if (!parseInt(req.query.year)) { |
| 140 | res.status(400).send({ |
| 141 | error: 'year must be an integer' |
| 142 | }); |
| 143 | } else { |
| 144 | const data = await service.getTransferPortal(req.query.year); |
| 145 | res.send(data); |
| 146 | } |
| 147 | } catch (err) { |
| 148 | Sentry.captureException(err); |
| 149 | res.status(500).send({ |
| 150 | error: 'Something went wrong.' |
| 151 | }); |
| 152 | } |
| 153 | }; |
| 154 | |
| 155 | return { |
| 156 | playerSearch, |
nothing calls this directly
no outgoing calls
no test coverage detected