Feature: Agent Profile Update with avatar (#449)

* Feature: Agent Profile Update with avatar
* Add Update Profile with name, avatar, email and password
This commit is contained in:
Pranav Raj S
2020-02-16 17:20:38 +05:30
committed by GitHub
parent e61ba95cf7
commit c4e2a84f65
25 changed files with 584 additions and 133 deletions

View File

@@ -1,5 +1,5 @@
class Api::V1::ProfilesController < Api::BaseController
before_action :fetch_user
before_action :set_user
def show
render json: @user
@@ -7,12 +7,11 @@ class Api::V1::ProfilesController < Api::BaseController
def update
@user.update!(profile_params)
render json: @user
end
private
def fetch_user
def set_user
@user = current_user
end