diff options
author | Chaoyi Zha <summermontreal@gmail.com> | 2017-03-13 02:55:25 +0300 |
---|---|---|
committer | Chaoyi Zha <summermontreal@gmail.com> | 2017-03-13 02:55:25 +0300 |
commit | 8ebe335a841de22f6eac3635898f579573861bf3 (patch) | |
tree | e2567c76a49b5a787d9d0bad57399e13d22713de | |
parent | bd250b8ce38f70a7105cd62967aaf55dd89dc937 (diff) |
Fix typo and remove debug statement
-rw-r--r-- | app/Http/Controllers/Api/ApiAnalyticsController.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/Http/Controllers/Api/ApiAnalyticsController.php b/app/Http/Controllers/Api/ApiAnalyticsController.php index 2efc4c2..692316d 100644 --- a/app/Http/Controllers/Api/ApiAnalyticsController.php +++ b/app/Http/Controllers/Api/ApiAnalyticsController.php @@ -23,7 +23,6 @@ class ApiAnalyticsController extends ApiController { 'right_bound' => 'date' ]); - error_log($validator->errors()); if ($validator->fails()) { return abort(400, 'Invalid or missing parameters.'); } @@ -42,9 +41,9 @@ class ApiAnalyticsController extends ApiController { } if (($link->creator != $user->username) && - !(UserHelper::userIsAdmin($username))){ + !(UserHelper::userIsAdmin($user->username))){ // If user does not own link and is not an admin - abort(401, 'You do not have access to this link.'); + abort(401, 'Unauthorized.'); } $stats = new StatsHelper($link->id, $left_bound, $right_bound); |