Commit 061c2fe1f7e443134129f77e68e4de3e72a9eeac

Authored by Alex Savenko
1 parent 73c25dbe

ap

Showing 1 changed file with 13 additions and 3 deletions   Show diff stats
app/library/App/Controllers/AllPositionController.php
... ... @@ -10,6 +10,7 @@ namespace App\Controllers;
10 10  
11 11  
12 12  
  13 +use Phalcon\Application\Exception;
13 14 use PhalconRest\Mvc\Controllers\CrudResourceController;
14 15 use xf3\AllPositions;
15 16  
... ... @@ -19,11 +20,20 @@ class AllPositionController extends CrudResourceController
19 20  
20 21 public function testAction() {
21 22  
22   - die("qwe");
  23 + try
  24 + {
  25 + $APObj = new AllPositions(self::API_KEY);
  26 +
  27 + $project_info = $APObj->get_project(418068);
  28 + }
  29 + catch (Exception $e)
  30 + {
  31 +
  32 + return $e->getMessage();
  33 +
  34 + }
23 35  
24   - $APObj = new AllPositions(self::API_KEY);
25 36  
26   - $project_info = $APObj->get_project(418068);
27 37  
28 38 return $project_info;
29 39  
... ...