Browse Source

hopefully fix the bug preventing post deletions sometimes.

master
Gisle Aune 3 years ago
parent
commit
4bccdc2ded
  1. 5
      database/postgres/posts.go

5
database/postgres/posts.go

@ -253,6 +253,11 @@ func (r *postRepository) Delete(ctx context.Context, post models.Post) error {
return err return err
} }
err = q.MovePost(ctx, psqlcore.MovePostParams{ID: post.ID, Position: -1})
if err != nil {
return err
}
err = q.DeletePost(ctx, post.ID) err = q.DeletePost(ctx, post.ID)
if err != nil { if err != nil {
return err return err

Loading…
Cancel
Save