diff --git a/delivery/http_server/benefactor/kind_box_req/add.go b/delivery/http_server/benefactor/kind_box_req/add.go index 19f1314..849b96c 100644 --- a/delivery/http_server/benefactor/kind_box_req/add.go +++ b/delivery/http_server/benefactor/kind_box_req/add.go @@ -10,11 +10,12 @@ import ( ) func (h Handler) Add(c echo.Context) error { - claims := claim.GetClaimsFromEchoContext(c) - req := param.KindBoxReqAddRequest{BenefactorID: claims.UserID} + req := param.KindBoxReqAddRequest{} if bErr := c.Bind(&req); bErr != nil { return echo.NewHTTPError(http.StatusBadRequest) } + claims := claim.GetClaimsFromEchoContext(c) + req.BenefactorID = claims.UserID if fieldErrors, err := h.benefactorKindBoxReqVld.ValidateAddRequest(req); err != nil { msg, code := httpmsg.Error(err)