Skip to content

Commit

Permalink
add getAllItemsHandlder
Browse files Browse the repository at this point in the history
  • Loading branch information
joe94 committed Sep 22, 2020
1 parent a1c4343 commit c267aa2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions store/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@ func newDeleteItemHandler(s S) Handler {
encodeGetOrDeleteItemResponse,
kithttp.ServerErrorEncoder(encodeError),
)
}

func newGetAllItemsHandler(s S) Handler {
return kithttp.NewServer(
newGetAllItemsEndpoint(s)
decodeGetAllItemsRequest,
encodeGetAllItemsResponse,
kithttp.ServerErrorEncoder(encodeError),
)
}

type requestHandler struct {
Expand Down

0 comments on commit c267aa2

Please sign in to comment.