Created first version of an API endpoint to undo stock bookings (references #63 and #97)

This commit is contained in:
Bernd Bestel
2018-10-26 22:28:58 +02:00
parent cd7b6b686d
commit 1080c3486c
5 changed files with 108 additions and 0 deletions

View File

@@ -165,4 +165,17 @@ class StockApiController extends BaseApiController
return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage());
}
}
public function UndoBooking(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
{
try
{
$this->ApiResponse($this->StockService->UndoBooking($args['stockLogId']));
return $this->ApiResponse(array('success' => true));
}
catch (\Exception $ex)
{
return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage());
}
}
}