summaryrefslogtreecommitdiff
path: root/internal/processing/media
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/media')
-rw-r--r--internal/processing/media/delete.go2
-rw-r--r--internal/processing/media/unattach.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/processing/media/delete.go b/internal/processing/media/delete.go
index 02bd6cd0d..c5a398094 100644
--- a/internal/processing/media/delete.go
+++ b/internal/processing/media/delete.go
@@ -40,7 +40,7 @@ func (p *Processor) Delete(ctx context.Context, mediaAttachmentID string) gtserr
}
// delete the attachment
- if err := p.state.DB.DeleteByID(ctx, mediaAttachmentID, attachment); err != nil && !errors.Is(err, db.ErrNoEntries) {
+ if err := p.state.DB.DeleteAttachment(ctx, mediaAttachmentID); err != nil && !errors.Is(err, db.ErrNoEntries) {
errs = append(errs, fmt.Sprintf("remove attachment: %s", err))
}
diff --git a/internal/processing/media/unattach.go b/internal/processing/media/unattach.go
index 7c6f7dbac..8db602239 100644
--- a/internal/processing/media/unattach.go
+++ b/internal/processing/media/unattach.go
@@ -49,7 +49,7 @@ func (p *Processor) Unattach(ctx context.Context, account *gtsmodel.Account, med
attachment.UpdatedAt = time.Now()
attachment.StatusID = ""
- if err := p.state.DB.UpdateByID(ctx, attachment, attachment.ID, updatingColumns...); err != nil {
+ if err := p.state.DB.UpdateAttachment(ctx, attachment, updatingColumns...); err != nil {
return nil, gtserror.NewErrorNotFound(fmt.Errorf("db error updating attachment: %s", err))
}