summaryrefslogtreecommitdiff
path: root/internal/media/prune.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/media/prune.go')
-rw-r--r--internal/media/prune.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/media/prune.go b/internal/media/prune.go
index 9e73fd2a3..aeddcef4c 100644
--- a/internal/media/prune.go
+++ b/internal/media/prune.go
@@ -320,7 +320,7 @@ func (m *manager) deleteAttachment(ctx context.Context, attachment *gtsmodel.Med
}
// Delete attachment completely.
- return m.state.DB.DeleteByID(ctx, attachment.ID, attachment)
+ return m.state.DB.DeleteAttachment(ctx, attachment.ID)
}
func (m *manager) uncacheAttachment(ctx context.Context, attachment *gtsmodel.MediaAttachment) error {
@@ -332,7 +332,7 @@ func (m *manager) uncacheAttachment(ctx context.Context, attachment *gtsmodel.Me
attachment.UpdatedAt = time.Now()
cached := false
attachment.Cached = &cached
- return m.state.DB.UpdateByID(ctx, attachment, attachment.ID, "updated_at", "cached")
+ return m.state.DB.UpdateAttachment(ctx, attachment, "updated_at", "cached")
}
func (m *manager) removeFiles(ctx context.Context, keys ...string) (int, error) {