Implemented team update method

This commit is contained in:
konrad 2018-07-14 18:29:24 +02:00 committed by kolaente
parent bcbd415529
commit 4cf0cd233c
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
9 changed files with 96 additions and 10 deletions

View file

@ -58,6 +58,10 @@ func (c *WebHandler) CreateWeb(ctx echo.Context) error {
return echo.NewHTTPError(http.StatusNotFound, "The namespace name cannot be empty.")
}
if models.IsErrTeamNameCannotBeEmpty(err) {
return echo.NewHTTPError(http.StatusBadRequest, "The team name cannot be empty.")
}
return echo.NewHTTPError(http.StatusInternalServerError)
}

View file

@ -1,6 +1,7 @@
package crud
import (
"fmt"
"git.kolaente.de/konrad/list/models"
"github.com/labstack/echo"
"net/http"
@ -50,6 +51,8 @@ func (c *WebHandler) UpdateWeb(ctx echo.Context) error {
return echo.NewHTTPError(http.StatusBadRequest, "The namespace owner cannot be empty.")
}
fmt.Println(err)
return echo.NewHTTPError(http.StatusInternalServerError)
}