Compare commits

..
2 Commits
Author SHA1 Message Date
Max e5291ba16b Log if app purchase was required and executed (#339) 2025-02-10 23:33:02 +01:00
AhmedBafkir 37af8f8468 Fix purchase issue (#338)
Fix purchase issue by updating endpoint
2025-02-10 23:25:58 +01:00
2 changed files with 7 additions and 1 deletions

No files matched your search

+6
View File
@@ -30,6 +30,7 @@ func downloadCmd() *cobra.Command {
var lastErr error
var acc appstore.Account
var purchased bool = false
return retry.Do(func() error {
infoResult, err := dependencies.AppStore.AccountInfo()
@@ -63,6 +64,10 @@ func downloadCmd() *cobra.Command {
if err != nil {
return err
}
purchased = true
dependencies.Logger.Verbose().
Bool("success", true).
Msg("purchase")
}
interactive, _ := cmd.Context().Value("interactive").(bool)
@@ -96,6 +101,7 @@ func downloadCmd() *cobra.Command {
dependencies.Logger.Log().
Str("output", out.DestinationPath).
Bool("purchased", purchased).
Bool("success", true).
Send()
+1 -1
View File
@@ -17,7 +17,7 @@ const (
PrivateAppStoreAPIDomainPrefixWithAuthCode = "p71"
PrivateAppStoreAPIDomain = "buy." + iTunesAPIDomain
PrivateAppStoreAPIPathAuthenticate = "/WebObjects/MZFinance.woa/wa/authenticate"
PrivateAppStoreAPIPathPurchase = "/WebObjects/MZBuy.woa/wa/buyProduct"
PrivateAppStoreAPIPathPurchase = "/WebObjects/MZFinance.woa/wa/buyProduct"
PrivateAppStoreAPIPathDownload = "/WebObjects/MZFinance.woa/wa/volumeStoreDownloadProduct"
HTTPHeaderStoreFront = "X-Set-Apple-Store-Front"