Added success status with json
This commit is contained in:
parent
925aae4f01
commit
f338593bee
|
@ -6,7 +6,7 @@ module Api
|
|||
def create
|
||||
@client = Client.new(client_params)
|
||||
if @client.save
|
||||
render :json => @client
|
||||
render :json => { :success => true, :user => @client.to_json }
|
||||
else
|
||||
render :json => { :errors => @client.errors.full_messages , :status => 422}.to_json
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue