Skip to content

Commit

Permalink
Fixed #484 by correcting template
Browse files Browse the repository at this point in the history
  • Loading branch information
steffenschroeder committed Jul 6, 2018
1 parent c1633c8 commit f83215d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions httpbin/templates/flasgger/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ <h2 class="title">httpbin.org

<script src="{{url_for('flasgger.static', filename='swagger-ui-bundle.js')}}"> </script>
<script src="{{url_for('flasgger.static', filename='swagger-ui-standalone-preset.js')}}"> </script>
<script src='{{url_for(' flasgger.static ', filename=' ')}}lib/jquery.min.js' type='text/javascript'></script>
<script src='{{url_for('flasgger.static', filename=' ')}}lib/jquery.min.js' type='text/javascript'></script>
<script>

window.onload = function () {
{% if config.JWT_AUTH_URL_RULE -%}
{% if config.JWT_AUTH_URL_RULE %}
// JWT token holder
var jwt_token;
{% - endif %}
{% endif %}

fetch("{{ specs[0]['url'] }}")
.then(function (response) {
Expand Down Expand Up @@ -177,7 +177,7 @@ <h2 class="title">httpbin.org
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
{% if config.JWT_AUTH_URL_RULE -%}
{% if config.JWT_AUTH_URL_RULE %}
requestInterceptor: function (request) {
if (jwt_token) {
request.headers.Authorization = "Bearer " + jwt_token;
Expand All @@ -195,7 +195,7 @@ <h2 class="title">httpbin.org

return response;
},
{% - endif %}
{% endif %}
// layout: "StandaloneLayout" // uncomment to enable the green top header
})

Expand Down

0 comments on commit f83215d

Please sign in to comment.