(req, res)
| 168 | }; |
| 169 | |
| 170 | const getPregameWP = async (req, res) => { |
| 171 | try { |
| 172 | if (req.query.year && !parseInt(req.query.year)) { |
| 173 | res.status(400).send({ |
| 174 | error: 'year must be numeric' |
| 175 | }); |
| 176 | } else if (req.query.week && !parseInt(req.query.week)) { |
| 177 | res.status(400).send({ |
| 178 | error: 'week must be numeric' |
| 179 | }); |
| 180 | } else { |
| 181 | const results = await service.getPregameWP(req.query.year, req.query.week, req.query.team, req.query.seasonType); |
| 182 | res.send(results); |
| 183 | } |
| 184 | } catch (err) { |
| 185 | Sentry.captureException(err); |
| 186 | res.status(500).send({ |
| 187 | error: 'Something went wrong.' |
| 188 | }); |
| 189 | } |
| 190 | }; |
| 191 | |
| 192 | const getFGEP = async (req, res) => { |
| 193 | try { |
nothing calls this directly
no outgoing calls
no test coverage detected