Skip to content

Commit

Permalink
Change var name
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkaOnLine committed Oct 12, 2021
1 parent b575bb2 commit 40e90fb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
operationsSorter: {!! isset($operationsSorter) ? '"' . $operationsSorter . '"' : 'null' !!},
configUrl: {!! isset($configUrl) ? '"' . $configUrl . '"' : 'null' !!},
validatorUrl: {!! isset($validatorUrl) ? '"' . $validatorUrl . '"' : 'null' !!},
oauth2RedirectUrl: "{{ route('l5-swagger.'.$documentation.'.oauth2_callback', $UseAbsolutePath) }}",
oauth2RedirectUrl: "{{ route('l5-swagger.'.$documentation.'.oauth2_callback', $useAbsolutePath) }}",
requestInterceptor: function(request) {
request.headers['X-CSRF-TOKEN'] = '{{ csrf_token() }}';
Expand Down
8 changes: 4 additions & 4 deletions src/Http/Controllers/SwaggerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function api(Request $request)
}

$urlToDocs = $this->generateDocumentationFileURL($documentation, $config);
$UseAbsolutePath = config('l5-swagger.documentations.'.$documentation.'.paths.use_absolute_path', true);
$useAbsolutePath = config('l5-swagger.documentations.'.$documentation.'.paths.use_absolute_path', true);

// Need the / at the end to avoid CORS errors on Homestead systems.
return ResponseFacade::make(
Expand All @@ -120,7 +120,7 @@ public function api(Request $request)
'operationsSorter' => $config['operations_sort'],
'configUrl' => $config['additional_config_url'],
'validatorUrl' => $config['validator_url'],
'UseAbsolutePath' => $UseAbsolutePath,
'useAbsolutePath' => $useAbsolutePath,
]),
200
);
Expand Down Expand Up @@ -159,12 +159,12 @@ protected function generateDocumentationFileURL(string $documentation, array $co
$fileUsedForDocs = $config['paths']['docs_yaml'];
}

$UseAbsolutePath = config('l5-swagger.documentations.'.$documentation.'.paths.use_absolute_path', true);
$useAbsolutePath = config('l5-swagger.documentations.'.$documentation.'.paths.use_absolute_path', true);

return route(
'l5-swagger.'.$documentation.'.docs',
$fileUsedForDocs,
$UseAbsolutePath
$useAbsolutePath
);
}
}
4 changes: 2 additions & 2 deletions src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ function l5_swagger_asset(string $documentation, $asset)
throw new L5SwaggerException(sprintf('Requested L5 Swagger asset file (%s) does not exists', $asset));
}

$UseAbsolutePath = config('l5-swagger.documentations.'.$documentation.'.paths.use_absolute_path', true);
$useAbsolutePath = config('l5-swagger.documentations.'.$documentation.'.paths.use_absolute_path', true);

return route('l5-swagger.'.$documentation.'.asset', $asset, $UseAbsolutePath).'?v='.md5_file($file);
return route('l5-swagger.'.$documentation.'.asset', $asset, $useAbsolutePath).'?v='.md5_file($file);
}
}

0 comments on commit 40e90fb

Please sign in to comment.