@@ -17,13 +17,12 @@ |
||
| 17 | 17 | use Bantenprov\Workflow\Models\WorkflowTransition; |
| 18 | 18 | use Bantenprov\Workflow\Models\History; |
| 19 | 19 | use That0n3guy\Transliteration; |
| 20 | - |
|
| 21 | -use GuzzleHttp\Exception\GuzzleException; |
|
| 22 | 20 | use GuzzleHttp\Client; |
| 23 | -use GuzzleHttp\Pool; |
|
| 24 | -use GuzzleHttp\Psr7; |
|
| 25 | - |
|
| 26 | -use Validator, Image, Session, File, Response, Redirect, Exception; |
|
| 21 | +use Validator; |
|
| 22 | +use Session; |
|
| 23 | +use Response; |
|
| 24 | +use Redirect; |
|
| 25 | +use Exception; |
|
| 27 | 26 | use Auth; |
| 28 | 27 | |
| 29 | 28 | class ApiManagerController extends Controller |
@@ -183,6 +183,9 @@ discard block |
||
| 183 | 183 | } |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | + /** |
|
| 187 | + * @param string $model |
|
| 188 | + */ |
|
| 186 | 189 | private function getWorkflow($model){ |
| 187 | 190 | $data = WorkflowModel::where('content_type', 'like', '%' . $model . '%'); |
| 188 | 191 | return $data; |
@@ -611,6 +614,14 @@ discard block |
||
| 611 | 614 | } |
| 612 | 615 | } |
| 613 | 616 | |
| 617 | + /** |
|
| 618 | + * @param boolean $error |
|
| 619 | + * @param integer $statusCode |
|
| 620 | + * @param string $title |
|
| 621 | + * @param string $type |
|
| 622 | + * @param string $message |
|
| 623 | + * @param string $transition |
|
| 624 | + */ |
|
| 614 | 625 | private function SendClient($client, $host, $error, $statusCode, $title, $type, $message, $result, $state, $transition){ |
| 615 | 626 | if(Auth::guest()){ $current_user = 1; } |
| 616 | 627 | else{ $current_user = Auth::user()->id; } |
@@ -657,6 +668,9 @@ discard block |
||
| 657 | 668 | return $responses; |
| 658 | 669 | } |
| 659 | 670 | |
| 671 | + /** |
|
| 672 | + * @param string $keterangan |
|
| 673 | + */ |
|
| 660 | 674 | private function send_apimanager($url_apimanager,$client,$host,$keterangan){ |
| 661 | 675 | if(Auth::guest()){ $current_user = 1; } |
| 662 | 676 | else{ $current_user = Auth::user()->id; } |
@@ -3,8 +3,6 @@ |
||
| 3 | 3 | namespace App\Http\Middleware; |
| 4 | 4 | |
| 5 | 5 | use Closure; |
| 6 | -use Redirect; |
|
| 7 | -use Validator; |
|
| 8 | 6 | use App\ApiKeys; |
| 9 | 7 | use Bantenprov\Workflow\Models\History; |
| 10 | 8 | |
@@ -2,18 +2,16 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace App\Http\Controllers; |
| 4 | 4 | |
| 5 | -use App\Http\Controllers\Controller; |
|
| 6 | -use Illuminate\Http\Request; |
|
| 7 | -use App\Hostkeys; |
|
| 8 | -use That0n3guy\Transliteration; |
|
| 9 | - |
|
| 10 | -use GuzzleHttp\Exception\GuzzleException; |
|
| 11 | -use GuzzleHttp\Client; |
|
| 12 | -use GuzzleHttp\Pool; |
|
| 13 | -use GuzzleHttp\Psr7; |
|
| 14 | -use Auth; |
|
| 15 | - |
|
| 16 | -use Validator, Image, Session, File, Response, Redirect, Exception; |
|
| 5 | +use App\Http\Controllers\Controller; |
|
| 6 | +use Illuminate\Http\Request; |
|
| 7 | +use App\Hostkeys; |
|
| 8 | +use GuzzleHttp\Client; |
|
| 9 | +use Auth; |
|
| 10 | +use Validator; |
|
| 11 | +use Session; |
|
| 12 | +use Response; |
|
| 13 | +use Redirect; |
|
| 14 | +use Exception; |
|
| 17 | 15 | |
| 18 | 16 | class HostkeysController extends Controller |
| 19 | 17 | {
|
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | /** |
| 60 | 60 | * Store a newly created resource in storage. |
| 61 | 61 | * |
| 62 | - * @return Response |
|
| 62 | + * @return \Illuminate\Http\JsonResponse |
|
| 63 | 63 | */ |
| 64 | 64 | public function store(Request $request) |
| 65 | 65 | {
|
@@ -214,6 +214,10 @@ discard block |
||
| 214 | 214 | return Redirect::to('host-keys');
|
| 215 | 215 | } |
| 216 | 216 | |
| 217 | + /** |
|
| 218 | + * @param Request $request |
|
| 219 | + * @param string $keterangan |
|
| 220 | + */ |
|
| 217 | 221 | private function send_apimanager($url_apimanager,$request,$current_user,$keterangan){
|
| 218 | 222 | $headers = ['Content-Type' => 'application/json']; |
| 219 | 223 | $host = str_replace(array('https://', 'http://'), array('',''),$request->host);
|
@@ -254,7 +258,7 @@ discard block |
||
| 254 | 258 | * Update the specified resource in storage. |
| 255 | 259 | * |
| 256 | 260 | * @param int $id |
| 257 | - * @return Response |
|
| 261 | + * @return \Illuminate\Http\JsonResponse |
|
| 258 | 262 | */ |
| 259 | 263 | public function update(Request $request, $id) |
| 260 | 264 | {
|