app/assets/javascripts/garage/docs/console.js.coffee in the_garage-2.5.0 vs app/assets/javascripts/garage/docs/console.js.coffee in the_garage-2.6.0

- old
+ new

@@ -7,18 +7,10 @@ $(".modal-close").click (ev) -> $.colorbox.close() ev.preventDefault() - buildAuthorizedUrl = (base, location, token) -> - url = base + location - if url.indexOf('?') > 0 - url += '&' - else - url += '?' - url + 'access_token=' + token - addNewParamField = (container) -> nextId = "parameter-" + $('.parameter', container).length copy = $('.template .parameter').clone().attr('id', nextId) $('.close-field', copy).click (ev) -> $('#' + nextId).detach() @@ -50,14 +42,14 @@ $('.console .send-request').click (ev) -> $('#api-headers').text '' $('#api-response').text '' - url = buildAuthorizedUrl $('#base').val(), $('#location').val(), $('#access_token').val() console.log buildData($('.parameters')) $.ajax type: $('#method').val(), - url: url, + url: $('#base').val() + $('#location').val(), + headers: {'Authorization': 'Bearer ' + $('#access_token').val()}, cache: false, data: buildData($('.parameters')), dataType: 'json', complete: -> queryString = $.param({'location': $('#location').val(), 'method': $('#method').val()})