diff --git a/app/Http/Controllers/AccountApiController.php b/app/Http/Controllers/AccountApiController.php index c42cfdeeec..f0046d42e2 100644 --- a/app/Http/Controllers/AccountApiController.php +++ b/app/Http/Controllers/AccountApiController.php @@ -120,8 +120,8 @@ class AccountApiController extends BaseAPIController public function addDeviceToken(Request $request) { - //$account = Auth::user()->account; - $account = Account::where('account_key', $request->account_key)->first(); + $account = Auth::user()->account; + //$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) $devices = json_decode($account->devices,TRUE); @@ -159,8 +159,8 @@ class AccountApiController extends BaseAPIController public function updatePushNotifications(Request $request) { - //$account = Auth::user()->account; - $account = Account::where('account_key', $request->account_key)->first(); + $account = Auth::user()->account; + // $account = Account::where('account_key', $request->account_key)->first(); $devices = json_decode($account->devices, TRUE);