Commit 86f05c395898c56fdda8847b058b1e80c5f46104
1 parent
f98d60e3
ga output
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/library/App/Controllers/GaController.php
@@ -38,7 +38,7 @@ class GaController extends CrudResourceController { | @@ -38,7 +38,7 @@ class GaController extends CrudResourceController { | ||
38 | 38 | ||
39 | if (empty($view_id)) { | 39 | if (empty($view_id)) { |
40 | $result = []; | 40 | $result = []; |
41 | - $projects = Project::find(['user_id' => $user_id]); | 41 | + $projects = Project::findFirst(['user_id' => $user_id]); |
42 | foreach ($projects as $project) { | 42 | foreach ($projects as $project) { |
43 | $view_id = (string)$project->ga_view_id; | 43 | $view_id = (string)$project->ga_view_id; |
44 | $result[] = $this->sendGaRequest($project->name, $view_id, $get_metrics, $get_dimensions, $get_start_date, $get_end_date, $chart); | 44 | $result[] = $this->sendGaRequest($project->name, $view_id, $get_metrics, $get_dimensions, $get_start_date, $get_end_date, $chart); |