mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge branch 'develop' of github.com:hillelcoren/invoice-ninja into develop
This commit is contained in:
commit
747f199ce8
@ -132,6 +132,8 @@ class AccountApiController extends BaseAPIController
|
|||||||
$devices[$x]['token'] = $request->token; //update
|
$devices[$x]['token'] = $request->token; //update
|
||||||
$account->devices = json_encode($devices);
|
$account->devices = json_encode($devices);
|
||||||
$account->save();
|
$account->save();
|
||||||
|
$devices[$x]['account_key'] = $account->account_key;
|
||||||
|
|
||||||
return $this->response($devices[$x]);
|
return $this->response($devices[$x]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -142,6 +144,7 @@ class AccountApiController extends BaseAPIController
|
|||||||
'token' => $request->token,
|
'token' => $request->token,
|
||||||
'email' => $request->email,
|
'email' => $request->email,
|
||||||
'device' => $request->device,
|
'device' => $request->device,
|
||||||
|
'account_key' => $account->account_key,
|
||||||
'notify_sent' => TRUE,
|
'notify_sent' => TRUE,
|
||||||
'notify_viewed' => TRUE,
|
'notify_viewed' => TRUE,
|
||||||
'notify_approved' => TRUE,
|
'notify_approved' => TRUE,
|
||||||
@ -174,15 +177,16 @@ class AccountApiController extends BaseAPIController
|
|||||||
'token' => $devices[$x]['token'],
|
'token' => $devices[$x]['token'],
|
||||||
'email' => $devices[$x]['email'],
|
'email' => $devices[$x]['email'],
|
||||||
'device' => $devices[$x]['device'],
|
'device' => $devices[$x]['device'],
|
||||||
|
'account_key' => $account->account_key,
|
||||||
'notify_sent' => $request->notify_sent,
|
'notify_sent' => $request->notify_sent,
|
||||||
'notify_viewed' => $request->notify_viewed,
|
'notify_viewed' => $request->notify_viewed,
|
||||||
'notify_approved' => $request->notify_approved,
|
'notify_approved' => $request->notify_approved,
|
||||||
'notify_paid' => $request->notify_paid,
|
'notify_paid' => $request->notify_paid,
|
||||||
];
|
];
|
||||||
|
|
||||||
unset($devices[$x]);
|
//unset($devices[$x]);
|
||||||
|
|
||||||
$devices[] = $newDevice;
|
$devices[$x] = $newDevice;
|
||||||
$account->devices = json_encode($devices);
|
$account->devices = json_encode($devices);
|
||||||
$account->save();
|
$account->save();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user