mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-03 00:23:15 -06:00
update remainder of delete functions to behave in similar way, some other small tweaks
This commit is contained in:
parent
f052af6e02
commit
2485442086
23 changed files with 555 additions and 633 deletions
|
|
@ -142,7 +142,7 @@ func (p *Processor) ReportResolve(ctx context.Context, account *gtsmodel.Account
|
|||
columns = append(columns, "action_taken")
|
||||
}
|
||||
|
||||
updatedReport, err := p.state.DB.UpdateReport(ctx, report, columns...)
|
||||
err = p.state.DB.UpdateReport(ctx, report, columns...)
|
||||
if err != nil {
|
||||
return nil, gtserror.NewErrorInternalError(err)
|
||||
}
|
||||
|
|
@ -156,7 +156,7 @@ func (p *Processor) ReportResolve(ctx context.Context, account *gtsmodel.Account
|
|||
Target: report.Account,
|
||||
})
|
||||
|
||||
apimodelReport, err := p.converter.ReportToAdminAPIReport(ctx, updatedReport, account)
|
||||
apimodelReport, err := p.converter.ReportToAdminAPIReport(ctx, report, account)
|
||||
if err != nil {
|
||||
return nil, gtserror.NewErrorInternalError(err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,11 +126,6 @@ func (u *utils) wipeStatus(
|
|||
errs.Appendf("error deleting status poll: %w", err)
|
||||
}
|
||||
|
||||
// Delete any poll votes pointing to this poll ID.
|
||||
if err := u.state.DB.DeletePollVotes(ctx, pollID); err != nil {
|
||||
errs.Appendf("error deleting status poll votes: %w", err)
|
||||
}
|
||||
|
||||
// Cancel any scheduled expiry task for poll.
|
||||
_ = u.state.Workers.Scheduler.Cancel(pollID)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue