try fix again.
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-07-26 20:50:03 +02:00
parent 4bccdc2ded
commit bd27b14a88
3 changed files with 14 additions and 6 deletions
+5 -5
View File
@@ -258,11 +258,6 @@ func (r *postRepository) Delete(ctx context.Context, post models.Post) error {
return err
}
err = q.DeletePost(ctx, post.ID)
if err != nil {
return err
}
err = q.ShiftPostsAfter(ctx, psqlcore.ShiftPostsAfterParams{
ShiftOffset: -1,
LogShortID: post.LogID,
@@ -272,6 +267,11 @@ func (r *postRepository) Delete(ctx context.Context, post models.Post) error {
return err
}
err = q.DeletePost(ctx, post.ID)
if err != nil {
return err
}
err = tx.Commit()
if err != nil {
return err