Push products

This commit is contained in:
Aditya Siregar 2025-08-13 20:30:39 +07:00
parent b72ab4ef3d
commit 82f72fc3eb

View File

@ -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