summaryrefslogtreecommitdiff
path: root/app/Api
diff options
context:
space:
mode:
Diffstat (limited to 'app/Api')
-rw-r--r--app/Api/Middleware/AuthenticationApiMiddleware.php7
-rw-r--r--app/Api/SubtaskTimeTrackingApi.php34
2 files changed, 41 insertions, 0 deletions
diff --git a/app/Api/Middleware/AuthenticationApiMiddleware.php b/app/Api/Middleware/AuthenticationApiMiddleware.php
index 5f63e1a1..b16e10b8 100644
--- a/app/Api/Middleware/AuthenticationApiMiddleware.php
+++ b/app/Api/Middleware/AuthenticationApiMiddleware.php
@@ -32,13 +32,20 @@ class AuthenticationApiMiddleware extends Base implements MiddlewareInterface
'getDefaultTaskColors',
'getColorList',
'getProjectById',
+ 'getSubTask',
'getTask',
'getTaskByReference',
+ 'getTimeSpent',
'getAllTasks',
+ 'getAllSubTasks',
+ 'hasTimer',
+ 'logStartTime',
+ 'logEndTime',
'openTask',
'closeTask',
'moveTaskPosition',
'createTask',
+ 'createSubtask',
'updateTask',
'getBoard',
'getProjectActivity',
diff --git a/app/Api/SubtaskTimeTrackingApi.php b/app/Api/SubtaskTimeTrackingApi.php
new file mode 100644
index 00000000..0e700b31
--- /dev/null
+++ b/app/Api/SubtaskTimeTrackingApi.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Kanboard\Api;
+
+use Kanboard\Core\Base;
+
+/**
+ * Subtask Time Tracking API controller
+ *
+ * @package api
+ * @author Nikolaos Georgakis
+ */
+class SubtaskTimeTrackingApi extends Base
+{
+ public function hasTimer($subtask_id,$user_id)
+ {
+ return $this->subtaskTimeTrackingModel->hasTimer($subtask_id,$user_id);
+ }
+
+ public function logStartTime($subtask_id,$user_id)
+ {
+ return $this->subtaskTimeTrackingModel->logStartTime($subtask_id,$user_id);
+ }
+
+ public function logEndTime($subtask_id,$user_id)
+ {
+ return $this->subtaskTimeTrackingModel->logEndTime($subtask_id,$user_id);
+ }
+
+ public function getTimeSpent($subtask_id,$user_id)
+ {
+ return $this->subtaskTimeTrackingModel->getTimeSpent($subtask_id,$user_id);
+ }
+}