Require authentication on unpin endpoint
This commit is contained in:
parent
dd8f51160f
commit
6cbce2c157
|
@ -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])
|
||||
|
|
Loading…
Reference in New Issue