mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-24 00:03:31 -06:00
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
This commit is contained in:
parent
071eca20ce
commit
2dc9fc1626
713 changed files with 98694 additions and 22704 deletions
|
|
@ -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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue