Document URLs for settings controller actions
No need to read the route sources all the time
This commit is contained in:
parent
ba683a7b95
commit
118fddb497
@ -21,6 +21,7 @@ class SettingsController < ApplicationController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# PUT /settings/:section
|
||||||
def update
|
def update
|
||||||
@user.preferences.merge!(user_params[:preferences] || {})
|
@user.preferences.merge!(user_params[:preferences] || {})
|
||||||
@user.display_name = user_params[:display_name]
|
@user.display_name = user_params[:display_name]
|
||||||
@ -44,6 +45,7 @@ class SettingsController < ApplicationController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# POST /settings/update_email
|
||||||
def update_email
|
def update_email
|
||||||
if @user.valid_ldap_authentication?(security_params[:current_password])
|
if @user.valid_ldap_authentication?(security_params[:current_password])
|
||||||
if @user.update email: email_params[:email]
|
if @user.update email: email_params[:email]
|
||||||
@ -61,6 +63,7 @@ class SettingsController < ApplicationController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# POST /settings/reset_email_password
|
||||||
def reset_email_password
|
def reset_email_password
|
||||||
@user.current_password = security_params[:current_password]
|
@user.current_password = security_params[:current_password]
|
||||||
|
|
||||||
@ -83,6 +86,7 @@ class SettingsController < ApplicationController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# POST /settings/reset_password
|
||||||
def reset_password
|
def reset_password
|
||||||
current_user.send_reset_password_instructions
|
current_user.send_reset_password_instructions
|
||||||
sign_out current_user
|
sign_out current_user
|
||||||
@ -90,6 +94,7 @@ class SettingsController < ApplicationController
|
|||||||
redirect_to check_your_email_path, notice: msg
|
redirect_to check_your_email_path, notice: msg
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# POST /settings/set_nostr_pubkey
|
||||||
def set_nostr_pubkey
|
def set_nostr_pubkey
|
||||||
signed_event = Nostr::Event.new(**nostr_event_from_params)
|
signed_event = Nostr::Event.new(**nostr_event_from_params)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user