wip
This commit is contained in:
@@ -27,15 +27,14 @@ export class CreateTeamUseCase {
|
||||
throw new Error('Driver already belongs to a team');
|
||||
}
|
||||
|
||||
const team: Team = {
|
||||
const team = Team.create({
|
||||
id: `team-${Date.now()}`,
|
||||
name,
|
||||
tag,
|
||||
description,
|
||||
ownerId,
|
||||
leagues,
|
||||
createdAt: new Date(),
|
||||
};
|
||||
});
|
||||
|
||||
const createdTeam = await this.teamRepository.create(team);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user