1
0

Implemented search for everything (#17)

This commit is contained in:
konrad
2018-11-09 17:33:06 +00:00
committed by Gitea
parent ad74d24ee2
commit d3de658882
18 changed files with 49 additions and 32 deletions

View File

@ -37,7 +37,10 @@ func (c *WebHandler) ReadAllWeb(ctx echo.Context) error {
return echo.NewHTTPError(http.StatusBadRequest, "Bad page requested.")
}
lists, err := currentStruct.ReadAll(&currentUser, pageNumber)
// Search
search := ctx.QueryParam("s")
lists, err := currentStruct.ReadAll(search, &currentUser, pageNumber)
if err != nil {
return HandleHTTPError(err)
}