Skip to content

Commit

Permalink
fixing ipfs root for later
Browse files Browse the repository at this point in the history
  • Loading branch information
karnthis committed Nov 2, 2023
1 parent c7b6bdc commit 7904770
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions japicore/fidRouteHandling.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ func (j JApiCore) IpfsHandler() bunrouter.HandlerFunc {
return func(w http.ResponseWriter, req bunrouter.Request) error {
var allBytes []byte

operatingRoot := jutils.LoadEnvVarOrFallback("JAPI_IPFS_ROOT", "s/JAPI/IPFS")
JAPI_IPFS_ROOT := jutils.LoadEnvVarOrFallback("JAPI_IPFS_ROOT", "s/JAPI/IPFS")
gateway := jutils.LoadEnvVarOrFallback("JAPI_IPFS_GATEWAY", "https://ipfs.io/ipfs/")
toClone := false
operatingRoot := "s/" + JAPI_IPFS_ROOT

cloneHeader := req.Header.Get("J-Clone-Ipfs")
if strings.ToLower(cloneHeader) == "true" {
toClone = true
}
toClone := strings.ToLower(cloneHeader) == "true"

id := req.Param("id")
if len(id) == 0 {
Expand Down

0 comments on commit 7904770

Please sign in to comment.