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