Commit 6425bc02 authored by philippepary's avatar philippepary
Browse files

Added tax route

parent 1ad141d1
......@@ -3,11 +3,12 @@
use \Pasteque\Server\System\API\APICaller;
/**
* GET taxGetAllGet
* Summary:
* Notes: Get a array of all Tax
* Output-Formats: [application/json]
* @rest\endpoint /tax/getAll
* @rest\method GET Get all taxes
* @rest\response 200 array(Tax) An array of taxes
* @rest\tags taxes
*/
//
$app->GET('/api/tax/getAll', function($request, $response, $args) {
$ptApp = $this->get('settings')['ptApp'];
return $response->withApiResult(APICaller::run($ptApp, 'tax', 'getAll'));
......@@ -15,10 +16,10 @@ $app->GET('/api/tax/getAll', function($request, $response, $args) {
/**
* GET taxIdGet
* Summary:
* Notes: Get a Tax
* Output-Formats: [application/json]
* @rest\endpoint /tax/{id}
* @rest\method GET Get a tax by its ID
* @rest\response 200 Tax The tax
* @rest\tags taxes
*/
$app->GET('/api/tax/{id}', function($request, $response, $args) {
$ptApp = $this->get('settings')['ptApp'];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment