From cdd497c45ec97e616d9b67aa4a5db285a1bf39af Mon Sep 17 00:00:00 2001 From: Ruslan Rotaru Date: Mon, 16 Oct 2023 14:18:57 +0100 Subject: [PATCH] fixed sync pin ls endpoint --- internal/sync/main.go | 2 +- internal/utils/types.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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"