Position parameter for Subtask Api proc. update

The objective of this PR is to add support for:

- [ ]  Adding "Position" parameter for Subtask Api Procedure "updateSubtask" method.

Background: I'm working on an Android Client for Kanboard using Flutter Framework. In order to update subtasks positions, I added the "position" parameter and managed the rest of the logic in the App.

Best Regards!
This commit is contained in:
José Aponte 2021-07-16 17:35:32 -04:00 committed by fguillot
parent b8b324e1d4
commit add701d8d7
1 changed files with 2 additions and 1 deletions

View File

@ -48,7 +48,7 @@ class SubtaskProcedure extends BaseProcedure
return $valid ? $this->subtaskModel->create($values) : false;
}
public function updateSubtask($id, $task_id, $title = null, $user_id = null, $time_estimated = null, $time_spent = null, $status = null)
public function updateSubtask($id, $task_id, $title = null, $user_id = null, $time_estimated = null, $time_spent = null, $status = null, $position = null)
{
TaskAuthorization::getInstance($this->container)->check($this->getClassName(), 'updateSubtask', $task_id);
@ -60,6 +60,7 @@ class SubtaskProcedure extends BaseProcedure
'time_estimated' => $time_estimated,
'time_spent' => $time_spent,
'status' => $status,
'position' => $position
);
foreach ($values as $key => $value) {