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

Function getPicks

app/draft/draft.controller.js:30–46  ·  view source on GitHub ↗
(req, res)

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected