feat(matches): add manual match creation functionality and related fields
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 59s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 59s
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user