hopefully fix the bug preventing post deletions sometimes.
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-07-26 20:32:55 +02:00
parent 67d6161c3b
commit 4bccdc2ded
+5
View File
@@ -253,6 +253,11 @@ func (r *postRepository) Delete(ctx context.Context, post models.Post) error {
return err
}
err = q.MovePost(ctx, psqlcore.MovePostParams{ID: post.ID, Position: -1})
if err != nil {
return err
}
err = q.DeletePost(ctx, post.ID)
if err != nil {
return err