feat: add nullable outlet_id to product

This commit is contained in:
2026-05-13 16:29:52 +07:00
parent dc5a823508
commit 12f96c1514
6 changed files with 23 additions and 1 deletions
+6
View File
@@ -172,6 +172,12 @@ func (h *ProductHandler) ListProducts(c *gin.Context) {
}
}
if outletIDStr := c.Query("outlet_id"); outletIDStr != "" {
if outletID, err := uuid.Parse(outletIDStr); err == nil {
req.OutletID = &outletID
}
}
if categoryIDStr := c.Query("category_id"); categoryIDStr != "" {
if categoryID, err := uuid.Parse(categoryIDStr); err == nil {
req.CategoryID = &categoryID