fixes: not attaching api_key to query if empty

This commit is contained in:
Almog Baku 2015-03-25 14:53:31 +02:00
parent 26fe302a5a
commit 752b953a07

View File

@ -486,9 +486,10 @@
$('input, button', $(this)).attr('disabled', 'disabled');
// append the query authentication
if (authentication_delivery == 'query') {
var api_key_val = $('#api_key').val();
if (authentication_delivery == 'query' && api_key_val.length>0) {
url += url.indexOf('?') > 0 ? '&' : '?';
url += api_key_parameter + '=' + $('#api_key').val();
url += api_key_parameter + '=' + api_key_val;
}
// prepare the api enpoint