mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 02:04:38 +00:00
Added the possibility to undo a task (closes #252)
This commit is contained in:
@@ -39,4 +39,17 @@ class TasksApiController extends BaseApiController
|
||||
return $this->GenericErrorResponse($response, $ex->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public function UndoTask(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->TasksService->UndoTask($args['taskId']);
|
||||
return $this->EmptyApiResponse($response);
|
||||
}
|
||||
catch (\Exception $ex)
|
||||
{
|
||||
return $this->GenericErrorResponse($response, $ex->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user