1
0

Cleanup/fixing methods

This commit is contained in:
konrad
2018-08-30 19:00:27 +02:00
committed by kolaente
parent efaa277751
commit aeb1521cc4
4 changed files with 55 additions and 12 deletions

View File

@ -33,6 +33,9 @@ func (c *WebHandler) DeleteWeb(ctx echo.Context) error {
if models.IsErrListDoesNotExist(err) {
return echo.NewHTTPError(http.StatusNotFound, "This list does not exist.")
}
if models.IsErrTeamDoesNotHaveAccessToList(err) {
return echo.NewHTTPError(http.StatusBadRequest, "This team does not have access to the list.")
}
if models.IsErrTeamDoesNotExist(err) {
return echo.NewHTTPError(http.StatusNotFound, "This team does not exist.")