nipb0: fixes to blossom.

This commit is contained in:
fiatjaf
2025-03-04 19:20:11 -03:00
parent 2865cccc46
commit b3b8d5804d
6 changed files with 13 additions and 16 deletions

View File

@@ -9,13 +9,12 @@ import (
// Delete deletes a file from the media server by its hash
func (c *Client) Delete(ctx context.Context, hash string) error {
err := c.httpCall(ctx, "DELETE", c.mediaserver+"/"+hash, "", func() string {
err := c.httpCall(ctx, "DELETE", hash, "", func() string {
return c.authorizationHeader(ctx, func(evt *nostr.Event) {
evt.Tags = append(evt.Tags, nostr.Tag{"t", "delete"})
evt.Tags = append(evt.Tags, nostr.Tag{"x", hash})
})
}, nil, 0, nil)
if err != nil {
return fmt.Errorf("failed to delete %s: %w", hash, err)
}