Skip to content

Commit

Permalink
remove contestteam from new contest
Browse files Browse the repository at this point in the history
  • Loading branch information
0214sh7 committed Oct 26, 2023
1 parent bee01d2 commit 498a2e7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions interfaces/handler/contest.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,7 @@ func (h *ContestHandler) CreateContest(c echo.Context) error {
return err
}

contestTeams := make([]schema.ContestTeam, 0, len(contest.ContestTeams))
for _, team := range contest.ContestTeams {
contestTeams = append(contestTeams, newContestTeam(team.ID, team.Name, team.Result, []schema.User{}))
}
res := newContestDetail(newContest(contest.ID, contest.Name, contest.TimeStart, contest.TimeEnd), contest.Link, contest.Description, contestTeams)
res := newContestDetail(newContest(contest.ID, contest.Name, contest.TimeStart, contest.TimeEnd), contest.Link, contest.Description, []schema.ContestTeam{})

return c.JSON(http.StatusCreated, res)
}
Expand Down

0 comments on commit 498a2e7

Please sign in to comment.