Require authentication on unpin endpoint

This commit is contained in:
Karina Kwiatek 2023-02-07 22:59:48 +01:00
parent dd8f51160f
commit 6cbce2c157
1 changed files with 1 additions and 1 deletions

View File

@ -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])