hopefully fix the bug preventing post deletions sometimes.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user