Commit 1445eed6cacef1a3bbc8f51147df5888dbddeec9

Authored by George Vlahavas

Merge branch 'master' of interlab.csd.auth.gr:anaskos/curex-knowledge-extraction-analytics-kea

Showing 2 changed files

api/app/Http/Controllers/V1/Partners/AdtController.php View file @ 1445eed
... ... @@ -6,8 +6,8 @@
6 6 use App\Http\Controllers\Controller;
7 7 use App\Http\Requests\AdtRequest;
8 8 use Carbon\Carbon;
  9 +use Illuminate\Http\Request;
9 10 use Illuminate\Support\Facades\DB;
10   -use Illuminate\Support\Facades\Log;
11 11 use Salman\Mqtt\Facades\Mqtt;
12 12  
13 13 class AdtController extends Controller
... ... @@ -39,6 +39,18 @@
39 39 DB::table('adt')->insert($dbEvents);
40 40  
41 41 return response()->json(['success' => 'success'], 200);
  42 + }
  43 +
  44 + public function get(Request $request)
  45 + {
  46 + return DB::table('adt')->select([
  47 + 'uuid',
  48 + 'time',
  49 + 'asset_id',
  50 + 'event_alarm_id',
  51 + 'event_alarm_char',
  52 + 'name'
  53 + ])->paginate(20);
42 54 }
43 55 }
api/routes/api.php View file @ 1445eed
... ... @@ -20,6 +20,7 @@
20 20 Route::get('capec', 'CapecController@index');
21 21 Route::group(['prefix' => 'v1'], function () {
22 22  
  23 + Route::get('adt', 'V1\Partners\AdtController@get');
23 24 Route::post('adt', 'V1\Partners\AdtController@store');
24 25 Route::post('xlsiem', 'V1\Partners\XlsiemController@store');
25 26 Route::post('vdm', 'V1\Partners\VdmController@store');