Let user remove nostr pubkey from account

This commit is contained in:
Râu Cao
2023-03-08 16:43:59 +07:00
parent 49de4007ab
commit e8bbe6c713
5 changed files with 64 additions and 5 deletions

View File

@@ -88,6 +88,15 @@ class SettingsController < ApplicationController
http_status :unprocessable_entity and return
end
# DELETE /settings/nostr_pubkey
def remove_nostr_pubkey
current_user.update! nostr_pubkey: nil
redirect_to setting_path(:experiments), flash: {
success: 'Public key removed from account'
}
end
private
def set_main_nav_section