well-goknown/vendor/github.com/fiatjaf/eventstore/postgresql/delete.go

13 lines
249 B
Go
Raw Permalink Normal View History

package postgresql
import (
"context"
"github.com/nbd-wtf/go-nostr"
)
func (b PostgresBackend) DeleteEvent(ctx context.Context, evt *nostr.Event) error {
_, err := b.DB.ExecContext(ctx, "DELETE FROM event WHERE id = $1", evt.ID)
return err
}