Skip to content

Commit

Permalink
Update Like a Post controller
Browse files Browse the repository at this point in the history
  • Loading branch information
João Marcello Bessa committed Mar 19, 2024
1 parent 160b891 commit 9eb0094
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/controllers/posts.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,7 @@ func LikePost(w http.ResponseWriter, r *http.Request) {
defer db.Close()

repository := repositories.NewPostsRepository(db)
posts, err := repository.Like(userID)
if err != nil {
if err = repository.Like(userID); err != nil {
responses.Error(w, http.StatusInternalServerError, err)
return
}
Expand Down

0 comments on commit 9eb0094

Please sign in to comment.