Cleanup/fixing methods

This commit is contained in:
konrad 2018-08-30 19:00:27 +02:00 committed by kolaente
parent efaa277751
commit aeb1521cc4
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
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.")