Add Outlet ID

This commit is contained in:
Aditya Siregar 2025-08-13 20:57:57 +07:00
parent 4cade376b9
commit 58dc92c722

View File

@ -138,13 +138,14 @@ func (h *InventoryHandler) GetInventory(c *gin.Context) {
func (h *InventoryHandler) ListInventory(c *gin.Context) {
ctx := c.Request.Context()
contextInfo := appcontext.FromGinContext(ctx)
req := &contract.ListInventoryRequest{
Page: 1,
Limit: 10,
Page: 1,
Limit: 10,
OutletID: &contextInfo.OutletID,
}
// Parse query parameters
if pageStr := c.Query("page"); pageStr != "" {
if page, err := strconv.Atoi(pageStr); err == nil {
req.Page = page