MCPcopy Create free account
hub / github.com/CFBD/cfb-api / getPregameWP

Function getPregameWP

app/ppa/ppa.controller.js:170–190  ·  view source on GitHub ↗
(req, res)

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected