Bug Fixes

This commit is contained in:
David Bomba 2016-03-02 22:14:42 +11:00
parent 8a33f6fec6
commit 1d0c35ec76

View File

@ -120,8 +120,8 @@ class AccountApiController extends BaseAPIController
public function addDeviceToken(Request $request) public function addDeviceToken(Request $request)
{ {
//$account = Auth::user()->account; $account = Auth::user()->account;
$account = Account::where('account_key', $request->account_key)->first(); //$account = Account::where('account_key', $request->account_key)->first();
//scan if this user has a token already registered (tokens can change, so we need to use the users email as key) //scan if this user has a token already registered (tokens can change, so we need to use the users email as key)
$devices = json_decode($account->devices,TRUE); $devices = json_decode($account->devices,TRUE);
@ -159,8 +159,8 @@ class AccountApiController extends BaseAPIController
public function updatePushNotifications(Request $request) public function updatePushNotifications(Request $request)
{ {
//$account = Auth::user()->account; $account = Auth::user()->account;
$account = Account::where('account_key', $request->account_key)->first(); // $account = Account::where('account_key', $request->account_key)->first();
$devices = json_decode($account->devices, TRUE); $devices = json_decode($account->devices, TRUE);