From 82f72fc3ebfff60fa52ce1bd1a37dfdbab70545a Mon Sep 17 00:00:00 2001 From: Aditya Siregar Date: Wed, 13 Aug 2025 20:30:39 +0700 Subject: [PATCH] Push products --- internal/handler/product_handler.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/handler/product_handler.go b/internal/handler/product_handler.go index 97e7cc2..bdbe54f 100644 --- a/internal/handler/product_handler.go +++ b/internal/handler/product_handler.go @@ -138,13 +138,14 @@ func (h *ProductHandler) GetProduct(c *gin.Context) { func (h *ProductHandler) ListProducts(c *gin.Context) { ctx := c.Request.Context() + contextInfo := appcontext.FromGinContext(ctx) req := &contract.ListProductsRequest{ - Page: 1, - Limit: 10, + Page: 1, + Limit: 10, + OrganizationID: &contextInfo.OrganizationID, } - // Parse query parameters if pageStr := c.Query("page"); pageStr != "" { if page, err := strconv.Atoi(pageStr); err == nil { req.Page = page