Merge branch '229-create-test-scripts' into 'master'
WIP: Resolve "Create test scripts" Closes #229 See merge request jankstudio/resq!268
This commit is contained in:
commit
8d7f1649c3
4 changed files with 3879 additions and 2 deletions
19
postman/PoC Resq.postman_environment.json
Executable file
19
postman/PoC Resq.postman_environment.json
Executable file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"id": "24bbd673-6484-405c-be3c-9232e7167813",
|
||||||
|
"name": "PoC Resq",
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"key": "resq_url",
|
||||||
|
"value": "http://resq.local",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "api_key",
|
||||||
|
"value": "5d2eedb4b4714",
|
||||||
|
"enabled": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_postman_variable_scope": "environment",
|
||||||
|
"_postman_exported_at": "2019-08-02T09:22:01.877Z",
|
||||||
|
"_postman_exported_using": "Postman/7.3.5"
|
||||||
|
}
|
||||||
2380
postman/Resq Mobile API - API Controller.postman_collection.json
Executable file
2380
postman/Resq Mobile API - API Controller.postman_collection.json
Executable file
File diff suppressed because it is too large
Load diff
1458
postman/resq_test.sql
Normal file
1458
postman/resq_test.sql
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -748,6 +748,26 @@ class APIController extends Controller
|
||||||
if ($res->isError())
|
if ($res->isError())
|
||||||
return $res->getReturnResponse();
|
return $res->getReturnResponse();
|
||||||
|
|
||||||
|
// get promos
|
||||||
|
$promos = $em->getRepository(Promo::class)->findBy([], ['name' => 'asc']);
|
||||||
|
|
||||||
|
$promo_list = [];
|
||||||
|
foreach($promos as $promo)
|
||||||
|
{
|
||||||
|
$promo_list[] = [
|
||||||
|
'id' => $promo->getID(),
|
||||||
|
'name' => $promo->getName(),
|
||||||
|
'code' => $promo->getCode(),
|
||||||
|
'discount_rate' => $promo->getDiscountRate(),
|
||||||
|
'discount_apply'=> $promo->getDiscountApply(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'promos' => $promo_list
|
||||||
|
];
|
||||||
|
$res->setData($data);
|
||||||
|
|
||||||
return $res->getReturnResponse();
|
return $res->getReturnResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -780,9 +800,9 @@ class APIController extends Controller
|
||||||
'mfg_id' => $batt->getManufacturer()->getID(),
|
'mfg_id' => $batt->getManufacturer()->getID(),
|
||||||
'mfg_name' => $batt->getManufacturer()->getName(),
|
'mfg_name' => $batt->getManufacturer()->getName(),
|
||||||
'model_id' => $batt->getModel()->getID(),
|
'model_id' => $batt->getModel()->getID(),
|
||||||
'model_name' => $batt->getModel()->getName(),
|
'model_name' => trim($batt->getModel()->getName()),
|
||||||
'size_id' => $batt->getSize()->getID(),
|
'size_id' => $batt->getSize()->getID(),
|
||||||
'size_name' => $batt->getSize()->getName(),
|
'size_name' => trim($batt->getSize()->getName()),
|
||||||
'price' => $batt->getSellingPrice(),
|
'price' => $batt->getSellingPrice(),
|
||||||
'wty_private' => $batt->getWarrantyPrivate(),
|
'wty_private' => $batt->getWarrantyPrivate(),
|
||||||
'wty_commercial' => $batt->getWarrantyCommercial(),
|
'wty_commercial' => $batt->getWarrantyCommercial(),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue