feat(match): normalize player lists before updating match data

- Added a `normalizeList` function to filter out duplicates and invalid entries from player arrays.
- Updated the match update logic to use normalized player lists for `playersReady`, `playersPlanned`, and `playersPlayed`.
- Enhanced error handling in the ScheduleView to throw an error for failed match updates based on response status.
This commit is contained in:
Torsten Schulz (local)
2026-02-05 23:07:41 +01:00
parent 5605cd6189
commit af6048b289
2 changed files with 25 additions and 4 deletions

View File

@@ -502,6 +502,9 @@ export default {
playersPlanned,
playersPlayed
});
if (response.status >= 400) {
throw new Error(response?.data?.error || 'Failed to update match players');
}
console.log('[savePlayerSelection] API response:', response);
// Update local match data