This commit is contained in:
20
app/controllers/accounts/custom_styles_controller.rb
Normal file
20
app/controllers/accounts/custom_styles_controller.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
class Accounts::CustomStylesController < ApplicationController
|
||||
before_action :ensure_can_administer, :set_account
|
||||
|
||||
def edit
|
||||
end
|
||||
|
||||
def update
|
||||
@account.update!(account_params)
|
||||
redirect_to edit_account_custom_styles_url
|
||||
end
|
||||
|
||||
private
|
||||
def set_account
|
||||
@account = Current.account
|
||||
end
|
||||
|
||||
def account_params
|
||||
params.require(:account).permit(:custom_styles)
|
||||
end
|
||||
end
|
||||
8
app/controllers/accounts/join_codes_controller.rb
Normal file
8
app/controllers/accounts/join_codes_controller.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class Accounts::JoinCodesController < ApplicationController
|
||||
before_action :ensure_can_administer
|
||||
|
||||
def create
|
||||
Current.account.reset_join_code
|
||||
redirect_to users_path
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user