diff --git a/internal/sync/main.go b/internal/sync/main.go index 75095ae..44fca33 100644 --- a/internal/sync/main.go +++ b/internal/sync/main.go @@ -74,7 +74,7 @@ func Sync(cmd *cobra.Command) { log.Printf("Syncing from %s to %s\n", src, dst) // Create the API URL for the IPFS pin/ls operation - listURL := fmt.Sprintf("%s%s", src, utils.DIR_LIST_ENDPOINT) + listURL := fmt.Sprintf("%s%s", src, utils.PIN_LIST_ENDPOINT) // Get the list of all CID's from the source IPFS // TODO: implement retry backoff with pester diff --git a/internal/utils/types.go b/internal/utils/types.go index 2bf7add..04669bd 100644 --- a/internal/utils/types.go +++ b/internal/utils/types.go @@ -3,6 +3,7 @@ package utils import "net/http" var DIR_LIST_ENDPOINT string = "/ipfs/api/v0/ls?arg=" +var PIN_LIST_ENDPOINT string = "/ipfs/api/v0/pin/ls" var CAT_ENDPOINT string = "/ipfs/api/v0/cat?arg=" var IPFS_PIN_ENDPOINT string = "/ipfs/api/v0/add" var HEADER_APP_JSON string = "application/json"