From 2525b3c805080c49010915efd362204f79bd6f01 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 13 Apr 2021 19:10:12 +0200 Subject: [PATCH] Fixed visibility-filter endpoint --- public/api/services/jugglDbApi.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/api/services/jugglDbApi.inc.php b/public/api/services/jugglDbApi.inc.php index 2d94781..bec687c 100644 --- a/public/api/services/jugglDbApi.inc.php +++ b/public/api/services/jugglDbApi.inc.php @@ -163,7 +163,10 @@ function getRunningRecords($user_id) function getRecords($user_id, $limit = NULL, $finished = NULL, $visible = NULL) { $db = new DbOperations(); - $db->select("time_records"); + $db->select("time_records", ["record_id", "start_time", "end_time", "duration", "user_id", "project_id", "start_device_id"]); + if ($visible != NULL) { + $db->innerJoin("projects", "project_id"); + } $db->where("user_id", Comparison::EQUAL, $user_id); if ($finished != NULL) { if ($finished) {