forked from ebhomengo/niki
Compare commits
1 Commits
develop
...
stage/erfa
Author | SHA1 | Date |
---|---|---|
Erfan Mohammadi | 1166c11b6f |
|
@ -1,6 +1,7 @@
|
|||
package benefactorkindboxhandler
|
||||
|
||||
import (
|
||||
"git.gocasts.ir/ebhomengo/niki/pkg/claim"
|
||||
"net/http"
|
||||
|
||||
param "git.gocasts.ir/ebhomengo/niki/param/benefactor/kind_box"
|
||||
|
@ -24,6 +25,8 @@ func (h Handler) Get(c echo.Context) error {
|
|||
if bErr := c.Bind(&req); bErr != nil {
|
||||
return echo.NewHTTPError(http.StatusBadRequest)
|
||||
}
|
||||
claims := claim.GetClaimsFromEchoContext(c)
|
||||
req.BenefactorID = claims.UserID
|
||||
|
||||
resp, sErr := h.benefactorKindBoxSvc.Get(c.Request().Context(), req)
|
||||
if sErr != nil {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package benefactorkindboxparam
|
||||
|
||||
type KindBoxGetRequest struct {
|
||||
BenefactorID uint
|
||||
KindBoxID uint
|
||||
BenefactorID uint `json:"-"`
|
||||
KindBoxID uint `param:"id"`
|
||||
}
|
||||
|
||||
type KindBoxGetResponse struct {
|
||||
|
|
Loading…
Reference in New Issue