mirror of
https://github.com/grocy/grocy.git
synced 2025-08-13 01:06:23 +00:00
Created API endpoints to undo battery charge cycles and chore executions (references #63)
This commit is contained in:
@@ -55,4 +55,17 @@ class ChoresApiController extends BaseApiController
|
||||
{
|
||||
return $this->ApiResponse($this->ChoresService->GetCurrent());
|
||||
}
|
||||
|
||||
public function UndoChoreExecution(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->ApiResponse($this->ChoresService->UndoChoreExecution($args['executionId']));
|
||||
return $this->ApiResponse(array('success' => true));
|
||||
}
|
||||
catch (\Exception $ex)
|
||||
{
|
||||
return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user