bring in mysql backend from relayer.

This commit is contained in:
fiatjaf
2023-10-31 16:06:44 -03:00
parent a82b9b4bde
commit 28fc5b0571
7 changed files with 371 additions and 23 deletions

12
mysql/delete.go Normal file
View File

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