Skip to content
Snippets Groups Projects
Commit 968809dc authored by James Lopez's avatar James Lopez
Browse files

fix profiles controller

parent aa158dd7
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -14,7 +14,7 @@ class ProfilesController < Profiles::ApplicationController
respond_to do |format|
result = Users::UpdateService.new(current_user, @user, user_params).execute
 
if result[:success]
if result[:status] == :success
message = "Profile was successfully updated"
 
format.html { redirect_back_or_default(default: { action: 'show' }, options: { notice: message }) }
Loading
Loading
@@ -65,7 +65,7 @@ class ProfilesController < Profiles::ApplicationController
def update_username
result = Users::UpdateService.new(current_user, @user, username: user_params[:username]).execute
 
options = if result[:success]
options = if result[:status] == :success
{ notice: "Username successfully changed" }
else
{ alert: "Username change failed - #{result[:message]}" }
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment