From f684602ebedc0adc4a329693ba524ad46d5cd8b0 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 23 Nov 2014 15:55:59 -0500 Subject: Create TaskModification model --- jsonrpc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'jsonrpc.php') diff --git a/jsonrpc.php b/jsonrpc.php index 37604011..8890bea0 100644 --- a/jsonrpc.php +++ b/jsonrpc.php @@ -8,6 +8,7 @@ $models = array( 'ProjectPermission', 'Task', 'TaskCreation', + 'TaskModification', 'TaskFinder', 'TaskPosition', 'TaskStatus', @@ -136,7 +137,7 @@ $server->register('createTask', function($title, $project_id, $color_id = '', $c return $taskCreationModel->create($values); }); -$server->register('updateTask', function($id, $title = null, $project_id = null, $color_id = null, $column_id = null, $owner_id = null, $creator_id = null, $date_due = null, $description = null, $category_id = null, $score = null) use ($taskModel, $taskValidatorModel) { +$server->register('updateTask', function($id, $title = null, $project_id = null, $color_id = null, $column_id = null, $owner_id = null, $creator_id = null, $date_due = null, $description = null, $category_id = null, $score = null) use ($taskModificationModel, $taskValidatorModel) { $values = array( 'id' => $id, @@ -159,7 +160,7 @@ $server->register('updateTask', function($id, $title = null, $project_id = null, } list($valid) = $taskValidatorModel->validateApiModification($values); - return $valid && $taskModel->update($values); + return $valid && $taskModificationModel->update($values); }); -- cgit v1.2.3