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

Function getPlays

app/live/live.controller.js:6–22  ·  view source on GitHub ↗
(req, res)

Source from the content-addressed store, hash-verified

4 const service = await serviceConstructor(db);
5
6 const getPlays = async (req, res) => {
7 try {
8 if (!req.query.id && !parseInt(req.query.id)) {
9 res.status(400).send({
10 error: 'A numeric game id is required.'
11 });
12 } else {
13 let results = await service.getPlays(req.query.id);
14 res.send(results);
15 }
16 } catch (err) {
17 Sentry.captureException(err);
18 res.status(500).send({
19 error: 'Something went wrong.'
20 });
21 }
22 };
23
24 return {
25 getPlays

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected