From c300def2cc4fac0def80264766d0ed7fa7a4f05c Mon Sep 17 00:00:00 2001 From: Yanislav Igonin Date: Wed, 1 Sep 2021 18:51:01 +0300 Subject: [PATCH] clean --- repositories/posts_repository.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/repositories/posts_repository.go b/repositories/posts_repository.go index ab4f87c..4a04083 100644 --- a/repositories/posts_repository.go +++ b/repositories/posts_repository.go @@ -77,9 +77,6 @@ func (r *PostsRepository) Create(p Post) (int, error) { context.TODO(), sql, p.IsParent, p.ParentID, p.Title, p.Text, p.IsSage, ) } - if err != nil { - return 0, nil - } createdPost := new(Post) row.Scan(&createdPost.ID)