Add Outlet ID
This commit is contained in:
parent
4cade376b9
commit
58dc92c722
@ -138,13 +138,14 @@ func (h *InventoryHandler) GetInventory(c *gin.Context) {
|
|||||||
|
|
||||||
func (h *InventoryHandler) ListInventory(c *gin.Context) {
|
func (h *InventoryHandler) ListInventory(c *gin.Context) {
|
||||||
ctx := c.Request.Context()
|
ctx := c.Request.Context()
|
||||||
|
contextInfo := appcontext.FromGinContext(ctx)
|
||||||
|
|
||||||
req := &contract.ListInventoryRequest{
|
req := &contract.ListInventoryRequest{
|
||||||
Page: 1,
|
Page: 1,
|
||||||
Limit: 10,
|
Limit: 10,
|
||||||
|
OutletID: &contextInfo.OutletID,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse query parameters
|
|
||||||
if pageStr := c.Query("page"); pageStr != "" {
|
if pageStr := c.Query("page"); pageStr != "" {
|
||||||
if page, err := strconv.Atoi(pageStr); err == nil {
|
if page, err := strconv.Atoi(pageStr); err == nil {
|
||||||
req.Page = page
|
req.Page = page
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user