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

Function getTransferPortal

app/player/player.controller.js:133–153  ·  view source on GitHub ↗
(req, res)

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected