Commit 67201a8049e1aa76293b627835b8cb87a48cdb86
1 parent
843113be29
Exists in
master
and in
2 other branches
Updated VdmController
Showing 1 changed file with 19 additions and 18 deletions
api/app/Http/Controllers/V1/Partners/VdmController.php
View file @
67201a8
... | ... | @@ -4,30 +4,31 @@ |
4 | 4 | |
5 | 5 | |
6 | 6 | use App\Http\Controllers\Controller; |
7 | -use App\Http\Requests\VdmRequest; | |
7 | +//use App\Http\Requests\VdmRequest; | |
8 | 8 | use Carbon\Carbon; |
9 | 9 | use Illuminate\Support\Facades\DB; |
10 | 10 | |
11 | 11 | class VdmController extends Controller |
12 | 12 | { |
13 | - public function store(VdmRequest $request) | |
13 | + //public function store(VdmRequest $request) | |
14 | + public function store() | |
14 | 15 | { |
15 | - $records = []; | |
16 | + // $records = []; | |
16 | 17 | |
17 | - // merge two input arrays | |
18 | - $cve = $request->get('cve'); | |
19 | - $cwe = $request->get('cwe'); | |
18 | + // // merge two input arrays | |
19 | + // $cve = $request->get('cve'); | |
20 | + // $cwe = $request->get('cwe'); | |
20 | 21 | |
21 | - $merged = array_merge($cve, $cwe); | |
22 | + // $merged = array_merge($cve, $cwe); | |
22 | 23 | |
23 | - foreach ($merged as $item) { | |
24 | - $records[] = [ | |
25 | - 'asset_id' => $request->get('asset_id'), | |
26 | - 'time' => Carbon::createFromTimestamp($request->get('timestamp')), | |
27 | - 'value' => $item | |
28 | - ]; | |
29 | - } | |
30 | - DB::table('vdm')->insert($records); | |
24 | + // foreach ($merged as $item) { | |
25 | + // $records[] = [ | |
26 | + // 'asset_id' => $request->get('asset_id'), | |
27 | + // 'time' => Carbon::createFromTimestamp($request->get('timestamp')), | |
28 | + // 'value' => $item | |
29 | + // ]; | |
30 | + // } | |
31 | + // DB::table('vdm')->insert($records); | |
31 | 32 | return response()->json(['success' => 'success'], 200); |
32 | 33 | } |
33 | 34 |