Untitled
unknown
plain_text
2 years ago
546 B
8
Indexable
const getInProgressController = async (req: Request, res: Response) => {
const { inProgress } = req.query;
const inProgressBoolean = inProgress === 'true';
const matches = await matchesService.getInProgress(inProgressBoolean);
return res.status(200).json(matches);
};
const getAllMatchesController = async (req: Request, res: Response) => {
const { inProgress } = req.query;
if (inProgress) return getInProgressController(req, res);
const matches = await matchesService.getAllMatches();
return res.status(200).json(matches);
};
Editor is loading...
Leave a Comment