feat(official-tournaments): implement reimport functionality for official tournaments
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 57s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 57s
This commit is contained in:
@@ -16,6 +16,20 @@ export const saveTournamentSuggestion = async (req, res) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const reimportOfficialTournament = async (req, res) => {
|
||||
try {
|
||||
const { authcode: userToken } = req.headers;
|
||||
const { clubId, id } = req.params;
|
||||
await checkAccess(userToken, clubId);
|
||||
const result = await officialTournamentService.reimportOfficialTournament(clubId, id);
|
||||
if (!result) return res.status(404).json({ error: 'Turnier nicht gefunden.' });
|
||||
return res.json(result);
|
||||
} catch (error) {
|
||||
console.error('[reimportOfficialTournament] Error:', error);
|
||||
return res.status(error.status || 500).json({ error: error.message || 'Turnierdaten konnten nicht aktualisiert werden.' });
|
||||
}
|
||||
};
|
||||
|
||||
export const updateOfficialTournament = async (req, res) => {
|
||||
try {
|
||||
const { authcode: userToken } = req.headers;
|
||||
|
||||
Reference in New Issue
Block a user