mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Use current_account from ApplicationController.
This avoids copy-pasting definitions of set_account.
This commit is contained in:
parent
4b68e82a19
commit
4c84513e04
@ -4,7 +4,6 @@ class Settings::KeywordMutesController < ApplicationController
|
|||||||
layout 'admin'
|
layout 'admin'
|
||||||
|
|
||||||
before_action :authenticate_user!
|
before_action :authenticate_user!
|
||||||
before_action :set_account
|
|
||||||
before_action :load_keyword_mute, only: [:edit, :update, :destroy]
|
before_action :load_keyword_mute, only: [:edit, :update, :destroy]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@ -50,12 +49,8 @@ class Settings::KeywordMutesController < ApplicationController
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def set_account
|
|
||||||
@account = current_user.account
|
|
||||||
end
|
|
||||||
|
|
||||||
def keyword_mutes_for_account
|
def keyword_mutes_for_account
|
||||||
Glitch::KeywordMute.where(account: @account)
|
Glitch::KeywordMute.where(account: current_account)
|
||||||
end
|
end
|
||||||
|
|
||||||
def load_keyword_mute
|
def load_keyword_mute
|
||||||
|
Loading…
Reference in New Issue
Block a user