mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-05-31 22:58:32 +00:00
make if else clauses easier to parse
This commit is contained in:
parent
1ec1af9e22
commit
2e5c93fdba
|
@ -60,8 +60,11 @@ func (f *federatingDB) Delete(ctx context.Context, id *url.URL) error {
|
|||
receiving,
|
||||
uriStr,
|
||||
)
|
||||
if err != nil || ok { // handles success
|
||||
if err != nil {
|
||||
return err
|
||||
} else if ok {
|
||||
// success!
|
||||
return nil
|
||||
}
|
||||
|
||||
// Attempt to delete status.
|
||||
|
@ -70,8 +73,11 @@ func (f *federatingDB) Delete(ctx context.Context, id *url.URL) error {
|
|||
receiving,
|
||||
uriStr,
|
||||
)
|
||||
if err != nil || ok { // handles success
|
||||
if err != nil {
|
||||
return err
|
||||
} else if ok {
|
||||
// success!
|
||||
return nil
|
||||
}
|
||||
|
||||
// Log at debug level, as lots of these could indicate federation
|
||||
|
|
Loading…
Reference in a new issue