Skip to content

Commit

Permalink
adjust UsersController spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
npauzenga committed Jan 21, 2016
1 parent f9b2e72 commit 7415144
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class UsersController < AuthenticationController
# POST /user
def create
result = CreateUser.call(user_params: user_params)

if result.success?
token = CreateAuthToken.call(user: result.user).token
render json: { jwt: token }, status: :created
Expand All @@ -15,6 +16,7 @@ def create
# PATCH /user
def update
result = UpdateUser.call(user: current_user, params: user_params)

if result.success?
render json: result.user, status: :ok
else
Expand All @@ -25,6 +27,7 @@ def update
# DELETE /user
def destroy
result = DeleteUser.call(id: current_user.id)

if result.success?
render json: result.message, status: :ok
else
Expand Down

0 comments on commit 7415144

Please sign in to comment.