From 6cbce2c1579f83710ba3b65194a8cdfdd08b695c Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Tue, 7 Feb 2023 22:59:48 +0100 Subject: [PATCH] Require authentication on unpin endpoint --- app/controllers/answer_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/answer_controller.rb b/app/controllers/answer_controller.rb index aaa5f07b..6b045f7a 100644 --- a/app/controllers/answer_controller.rb +++ b/app/controllers/answer_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class AnswerController < ApplicationController - before_action :authenticate_user!, only: :pin + before_action :authenticate_user!, only: %i[pin unpin] def show @answer = Answer.includes(comments: %i[user smiles], question: [:user], smiles: [:user]).find(params[:id])