This commit is contained in:
2025-12-12 01:11:36 +01:00
parent ec3ddc3a5c
commit 6a88fe93ab
125 changed files with 1513 additions and 803 deletions

View File

@@ -22,10 +22,12 @@ export class UpdateTeamUseCase {
throw new Error('Team not found');
}
const updated: Team = {
...existing,
...updates,
};
const updated = existing.update({
...(updates.name !== undefined && { name: updates.name }),
...(updates.tag !== undefined && { tag: updates.tag }),
...(updates.description !== undefined && { description: updates.description }),
...(updates.leagues !== undefined && { leagues: updates.leagues }),
});
await this.teamRepository.update(updated);
}