more conversions.
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
"fiatjaf.com/nostr"
|
||||
)
|
||||
|
||||
// Check checks if a file exists on the media server by its hash
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
"fiatjaf.com/nostr"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
"fiatjaf.com/nostr"
|
||||
)
|
||||
|
||||
// Delete deletes a file from the media server by its hash
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
"fiatjaf.com/nostr"
|
||||
)
|
||||
|
||||
// Download downloads a file from the media server by its hash
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"io"
|
||||
"strconv"
|
||||
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
"fiatjaf.com/nostr"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
||||
@@ -2,9 +2,10 @@ package blossom
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
"fiatjaf.com/nostr"
|
||||
)
|
||||
|
||||
// List retrieves a list of blobs from a specific pubkey
|
||||
@@ -15,7 +16,7 @@ func (c *Client) List(ctx context.Context) ([]BlobDescriptor, error) {
|
||||
}
|
||||
|
||||
bds := make([]BlobDescriptor, 0, 100)
|
||||
err = c.httpCall(ctx, "GET", "list/"+pubkey, "", func() string {
|
||||
err = c.httpCall(ctx, "GET", "list/"+hex.EncodeToString(pubkey[:]), "", func() string {
|
||||
return c.authorizationHeader(ctx, func(evt *nostr.Event) {
|
||||
evt.Tags = append(evt.Tags, nostr.Tag{"t", "list"})
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@ package blossom
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
"fiatjaf.com/nostr"
|
||||
)
|
||||
|
||||
// BlobDescriptor represents metadata about a blob stored on a media server
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
"fiatjaf.com/nostr"
|
||||
)
|
||||
|
||||
// UploadFile uploads a file to the media server
|
||||
|
||||
Reference in New Issue
Block a user