Skip to content

Commit

Permalink
no_contentを使うように修正する
Browse files Browse the repository at this point in the history
  • Loading branch information
yocchan-git committed Mar 24, 2024
1 parent 62c15a2 commit 7378029
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/api/followings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def create
user = User.find(params[:id])
watch = params[:watch] == 'true'
if current_user.follow(user, watch:)
head :ok
head :no_content
else
head :bad_request
end
Expand All @@ -17,7 +17,7 @@ def update
user = User.find(params[:id])
watch = params[:watch] == 'true'
if current_user.change_watching(user, watch)
head :ok
head :no_content
else
head :bad_request
end
Expand All @@ -26,7 +26,7 @@ def update
def destroy
user = User.find(params[:id])
if current_user.unfollow(user)
head :ok
head :no_content
else
head :bad_request
end
Expand Down

0 comments on commit 7378029

Please sign in to comment.