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

Function getPPAByTeam

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

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected