mock shop page: can set count
This commit is contained in:
@@ -322,7 +322,6 @@ func (db *Store) CreateMockListing(ctx context.Context, listing MockListing) (Mo
|
||||
return listing, nil
|
||||
}
|
||||
|
||||
// UpdateMockListing updates a mock listing, but not it's count
|
||||
func (db *Store) UpdateMockListing(ctx context.Context, listing MockListing) error {
|
||||
_, listingTableName, err := getMockShopAndListingsTableNames(listing.Platform)
|
||||
if err != nil {
|
||||
@@ -338,7 +337,8 @@ func (db *Store) UpdateMockListing(ctx context.Context, listing MockListing) err
|
||||
SET
|
||||
sku = @sku,
|
||||
name = @name,
|
||||
description = @description
|
||||
description = @description,
|
||||
"count" = @count
|
||||
WHERE
|
||||
account_id = @account_id
|
||||
AND shop_id = @shop_id
|
||||
@@ -353,6 +353,7 @@ func (db *Store) UpdateMockListing(ctx context.Context, listing MockListing) err
|
||||
"sku": listing.SKU,
|
||||
"name": listing.Name,
|
||||
"description": listing.Description,
|
||||
"count": listing.Count,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -365,6 +366,7 @@ func (db *Store) UpdateMockListing(ctx context.Context, listing MockListing) err
|
||||
return nil
|
||||
}
|
||||
|
||||
// TODO: will have to be updated once we start creating mock sync groups
|
||||
func (db *Store) DeleteMockListing(ctx context.Context, ids AccountShopListingIDs) error {
|
||||
_, listingTableName, err := getMockShopAndListingsTableNames(ids.Platform)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user