Remove subscription ajax controller locales

This commit is contained in:
Andreas Nedbal 2022-07-06 12:48:31 +02:00 committed by Karina Kwiatek
parent e670a50adf
commit 6d4478b7c4
2 changed files with 2 additions and 6 deletions

View File

@ -3,16 +3,14 @@ class Ajax::SubscriptionController < AjaxController
def subscribe
params.require :answer
@response[:status] = 418
@response[:message] = I18n.t('messages.subscription.torpedo')
@response[:status] = :okay
state = Subscription.subscribe(current_user, Answer.find(params[:answer])).nil?
@response[:success] = state == false
end
def unsubscribe
params.require :answer
@response[:status] = 418
@response[:message] = I18n.t('messages.subscription.torpedo')
@response[:status] = :okay
state = Subscription.unsubscribe(current_user, Answer.find(params[:answer])).nil?
@response[:success] = state == false
end

View File

@ -56,8 +56,6 @@ en:
error: "An error occurred."
parameter_error: "%{parameter} is required."
noauth: "requires authentication"
subscription:
torpedo: "418 I'm a torpedo"
views:
locale:
languages: "Languages"