mock shop page: can set count
This commit is contained in:
@@ -279,6 +279,7 @@ func (s *accountSubrouter) addMockListing(c *gin.Context) (response.Response, er
|
||||
name string
|
||||
sku string
|
||||
description string
|
||||
count int
|
||||
)
|
||||
|
||||
err := param.Path("platform", param.Platform(&platform)).
|
||||
@@ -286,6 +287,7 @@ func (s *accountSubrouter) addMockListing(c *gin.Context) (response.Response, er
|
||||
Form("name", param.Text(&name)).
|
||||
Form("sku", param.Text(&sku)).
|
||||
Form("description", param.Text(&description)).
|
||||
Form("count", param.Int(&count)).
|
||||
Unmarshal(c)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -300,6 +302,7 @@ func (s *accountSubrouter) addMockListing(c *gin.Context) (response.Response, er
|
||||
Name: name,
|
||||
SKU: sku,
|
||||
Description: description,
|
||||
Count: int64(count),
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -320,6 +323,7 @@ func (s *accountSubrouter) updateMockListing(c *gin.Context) (response.Response,
|
||||
name string
|
||||
sku string
|
||||
description string
|
||||
count int
|
||||
)
|
||||
|
||||
err := param.Path("platform", param.Platform(&platform)).
|
||||
@@ -328,6 +332,7 @@ func (s *accountSubrouter) updateMockListing(c *gin.Context) (response.Response,
|
||||
Form("name", param.Text(&name)).
|
||||
Form("sku", param.Text(&sku)).
|
||||
Form("description", param.Text(&description)).
|
||||
Form("count", param.Int(&count)).
|
||||
Unmarshal(c)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -342,6 +347,7 @@ func (s *accountSubrouter) updateMockListing(c *gin.Context) (response.Response,
|
||||
Name: name,
|
||||
SKU: sku,
|
||||
Description: description,
|
||||
Count: int64(count),
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user