Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
This commit removes mobile shopping cart addition functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmarmour committed Sep 30, 2020
1 parent 0ba2f8f commit d15d1a6
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions cmd/nvidia-clerk/nvidia-clerk.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,25 +77,12 @@ func main() {
log.Println("Product Status: " + info.Products.Product[0].InventoryStatus.Status + "\n")

if info.Products.Product[0].InventoryStatus.Status == "PRODUCT_INVENTORY_IN_STOCK" {
cart, err := rest.AddToCheckout(*config.SKU, token.Value, config.NvidiaLocale, client)
if err != nil {
log.Println("Error adding card to checkout retrying...")
continue
}

err = notify(info.Products.Product[0].Name, cart.URL, *remote, config, client)
err = notify(info.Products.Product[0].Name, fmt.Sprintf("https://www.nvidia.com/en-us/geforce/graphics-cards/30-series/rtx-%s/", model), *remote, config, client)
if err != nil {
log.Println("Error attempting to send notification retrying...")
continue
}

if *remote != true {
err = openbrowser(cart.URL)
if err != nil {
log.Fatal("Error attempting to open browser.", err)
}
}

break
}
}
Expand Down

0 comments on commit d15d1a6

Please sign in to comment.