Merge pull request #366 from smartandgeek/master

API - Client : Allow updating client data throw API
This commit is contained in:
Hillel Coren 2015-06-30 21:09:24 +02:00
commit 9afd99b245

View File

@ -43,7 +43,7 @@ class ClientApiController extends Controller
return Response::make($error, 500, $headers);
} else {
$client = $this->clientRepo->save(false, $data, false);
$client = $this->clientRepo->save(isset($data['id']) ? $data['id'] : false, $data, false);
$client->load('contacts');
$client = Utils::remapPublicIds($client->toArray());
$response = json_encode($client, JSON_PRETTY_PRINT);