1
0

implemented read all method for namespace teams

This commit is contained in:
konrad
2018-07-18 22:06:29 +02:00
parent 6618874441
commit 935c99be45
3 changed files with 45 additions and 0 deletions

View File

@ -14,6 +14,12 @@ func (c *WebHandler) ReadAllWeb(ctx echo.Context) error {
return echo.NewHTTPError(http.StatusInternalServerError, "Could not determine the current user.")
}
// Get the object & bind params to struct
if err := ParamBinder(c.CObject, ctx); err != nil {
fmt.Println(err)
return echo.NewHTTPError(http.StatusBadRequest, "No or invalid model provided.")
}
lists, err := c.CObject.ReadAll(&currentUser)
if err != nil {
fmt.Println(err)