feat: add nullable outlet_id to product

Co-authored-by: aider (openai/glm-5.1) <aider@aider.chat>
This commit is contained in:
2026-05-13 15:42:51 +07:00
co-authored by aider
parent dc5a823508
commit 3d124bafb0
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