From 1d0c35ec76a59ff3e69b822cb7483fdb193b0295 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 2 Mar 2016 22:14:42 +1100 Subject: [PATCH] Bug Fixes --- app/Http/Controllers/AccountApiController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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);