BYOK Personal Data Server (PDS) written in Go
ipfs vow atproto pds go
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: nil pointer

+3 -10
+2 -9
server/ipfs.go
··· 5 5 "encoding/json" 6 6 "io" 7 7 8 - caopts "github.com/ipfs/kubo/core/coreiface/options" 9 8 "github.com/ipfs/boxo/path" 10 9 "github.com/ipfs/go-cid" 11 - "github.com/ipfs/kubo/client/rpc" 10 + caopts "github.com/ipfs/kubo/core/coreiface/options" 12 11 ) 13 12 14 13 // readJSON decodes a single JSON value from r into dst. ··· 26 25 return 27 26 } 28 27 29 - node, err := rpc.NewURLApiWithClient(s.ipfsConfig.NodeURL, nil) 30 - if err != nil { 31 - s.logger.Warn("ipfs unpin: failed to create client", "cid", cidStr, "error", err) 32 - return 33 - } 34 - 35 28 p := path.FromCid(c) 36 - if err := node.Pin().Rm(context.Background(), p, caopts.Pin.RmRecursive(true)); err != nil { 29 + if err := s.ipfsAPI.Pin().Rm(context.Background(), p, caopts.Pin.RmRecursive(true)); err != nil { 37 30 // Don't log loudly if CID was never pinned 38 31 if !isNotPinnedError(err) { 39 32 s.logger.Warn("ipfs unpin: failed to unpin", "cid", cidStr, "error", err)
+1 -1
server/server.go
··· 394 394 return nil, fmt.Errorf("failed to create event persister: %w", err) 395 395 } 396 396 397 - ipfsAPI, err := rpc.NewURLApiWithClient(args.IPFSConfig.NodeURL, nil) 397 + ipfsAPI, err := rpc.NewURLApiWithClient(args.IPFSConfig.NodeURL, http.DefaultClient) 398 398 if err != nil { 399 399 return nil, fmt.Errorf("failed to create IPFS client: %w", err) 400 400 }