mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Refresh contacts after saving in API
This commit is contained in:
parent
c5e4707ef5
commit
5e374b2859
@ -82,6 +82,9 @@ class ClientApiController extends BaseAPIController
|
|||||||
{
|
{
|
||||||
$client = $this->clientRepo->save($request->input());
|
$client = $this->clientRepo->save($request->input());
|
||||||
|
|
||||||
|
// refresh contacts
|
||||||
|
$client->load(['contacts']);
|
||||||
|
|
||||||
return $this->itemResponse($client);
|
return $this->itemResponse($client);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,6 +120,8 @@ class ClientApiController extends BaseAPIController
|
|||||||
$data['public_id'] = $publicId;
|
$data['public_id'] = $publicId;
|
||||||
$client = $this->clientRepo->save($data, $request->entity());
|
$client = $this->clientRepo->save($data, $request->entity());
|
||||||
|
|
||||||
|
$client->load(['contacts']);
|
||||||
|
|
||||||
return $this->itemResponse($client);
|
return $this->itemResponse($client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user