feat(matches): add manual match creation functionality and related fields
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 59s

This commit is contained in:
Torsten Schulz (local)
2026-08-19 13:43:16 +02:00
parent dc447acf57
commit d251d40868
9 changed files with 261 additions and 9 deletions

View File

@@ -22,6 +22,19 @@ export const uploadCSV = async (req, res) => {
}
};
export const createManualMatch = async (req, res) => {
try {
const { authcode: userToken } = req.headers;
const { clubId } = req.params;
const result = await MatchService.createManualMatch(userToken, clubId, req.body);
emitScheduleMatchUpdated(result.clubId, result.id, result.match);
return res.status(201).json({ message: 'Spiel erfolgreich angelegt', data: result.match });
} catch (error) {
console.error('Error creating manual match:', error);
return res.status(error.statusCode || 500).json({ error: error.message || 'Spiel konnte nicht angelegt werden' });
}
};
export const getLeaguesForCurrentSeason = async (req, res) => {
try {
devLog(req.headers, req.params);