diff options
author | 2021-08-25 15:34:33 +0200 | |
---|---|---|
committer | 2021-08-25 15:34:33 +0200 | |
commit | 2dc9fc1626507bb54417fc4a1920b847cafb27a2 (patch) | |
tree | 4ddeac479b923db38090aac8bd9209f3646851c1 /internal/federation/federatingdb/delete.go | |
parent | Manually approves followers (#146) (diff) | |
download | gotosocial-2dc9fc1626507bb54417fc4a1920b847cafb27a2.tar.xz |
Pg to bun (#148)
* start moving to bun
* changing more stuff
* more
* and yet more
* tests passing
* seems stable now
* more big changes
* small fix
* little fixes
Diffstat (limited to 'internal/federation/federatingdb/delete.go')
-rw-r--r-- | internal/federation/federatingdb/delete.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/federation/federatingdb/delete.go b/internal/federation/federatingdb/delete.go index ee9310789..11b818168 100644 --- a/internal/federation/federatingdb/delete.go +++ b/internal/federation/federatingdb/delete.go @@ -69,11 +69,11 @@ func (f *federatingDB) Delete(ctx context.Context, id *url.URL) error { // in a delete we only get the URI, we can't know if we have a status or a profile or something else, // so we have to try a few different things... - s, err := f.db.GetStatusByURI(id.String()) + s, err := f.db.GetStatusByURI(ctx, id.String()) if err == nil { // it's a status l.Debugf("uri is for status with id: %s", s.ID) - if err := f.db.DeleteByID(s.ID, >smodel.Status{}); err != nil { + if err := f.db.DeleteByID(ctx, s.ID, >smodel.Status{}); err != nil { return fmt.Errorf("DELETE: err deleting status: %s", err) } fromFederatorChan <- gtsmodel.FromFederator{ @@ -84,11 +84,11 @@ func (f *federatingDB) Delete(ctx context.Context, id *url.URL) error { } } - a, err := f.db.GetAccountByURI(id.String()) + a, err := f.db.GetAccountByURI(ctx, id.String()) if err == nil { // it's an account - l.Debugf("uri is for an account with id: %s", s.ID) - if err := f.db.DeleteByID(a.ID, >smodel.Account{}); err != nil { + l.Debugf("uri is for an account with id: %s", a.ID) + if err := f.db.DeleteByID(ctx, a.ID, >smodel.Account{}); err != nil { return fmt.Errorf("DELETE: err deleting account: %s", err) } fromFederatorChan <- gtsmodel.FromFederator{ |