summaryrefslogtreecommitdiff
path: root/internal/db/statusfave.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/statusfave.go')
-rw-r--r--internal/db/statusfave.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/db/statusfave.go b/internal/db/statusfave.go
index 343a80caa..192ef436b 100644
--- a/internal/db/statusfave.go
+++ b/internal/db/statusfave.go
@@ -27,9 +27,12 @@ type StatusFave interface {
// GetStatusFaveByAccountID gets one status fave created by the given accountID, targeting the given statusID.
GetStatusFave(ctx context.Context, accountID string, statusID string) (*gtsmodel.StatusFave, error)
- // GetStatusFave returns one status fave with the given id.
+ // GetStatusFaveByID returns one status fave with the given id.
GetStatusFaveByID(ctx context.Context, id string) (*gtsmodel.StatusFave, error)
+ // GetStatusFaveByURI returns one status fave with the given uri.
+ GetStatusFaveByURI(ctx context.Context, uri string) (*gtsmodel.StatusFave, error)
+
// GetStatusFaves returns a slice of faves/likes of the status with given ID.
// This slice will be unfiltered, not taking account of blocks and whatnot, so filter it before serving it back to a user.
GetStatusFaves(ctx context.Context, statusID string) ([]*gtsmodel.StatusFave, error)
@@ -40,6 +43,9 @@ type StatusFave interface {
// PutStatusFave inserts the given statusFave into the database.
PutStatusFave(ctx context.Context, statusFave *gtsmodel.StatusFave) error
+ // UpdateStatusFave updates one statusFave in the database.
+ UpdateStatusFave(ctx context.Context, statusFave *gtsmodel.StatusFave, columns ...string) error
+
// DeleteStatusFave deletes one status fave with the given id.
DeleteStatusFaveByID(ctx context.Context, id string) error