(client pb.EcommClient, secretKey string)
| 21 | } |
| 22 | |
| 23 | func NewHandler(client pb.EcommClient, secretKey string) *handler { |
| 24 | return &handler{ |
| 25 | ctx: context.Background(), |
| 26 | client: client, |
| 27 | TokenMaker: token.NewJWTMaker(secretKey), |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | func (h *handler) createProduct(w http.ResponseWriter, r *http.Request) { |
| 32 | var p ProductReq |