Added tests for team members
This commit is contained in:
parent
d556162591
commit
261136c2bc
8 changed files with 112 additions and 2 deletions
|
|
@ -37,6 +37,10 @@ func (c *WebHandler) DeleteWeb(ctx echo.Context) error {
|
|||
return echo.NewHTTPError(http.StatusNotFound, "This team does not exist.")
|
||||
}
|
||||
|
||||
if models.IsErrCannotDeleteLastTeamMember(err) {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "You cannot delete the last member of a team.")
|
||||
}
|
||||
|
||||
return echo.NewHTTPError(http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue