Skip to content

Commit

Permalink
fixed a bug with missing traling slashes in endpoint server
Browse files Browse the repository at this point in the history
  • Loading branch information
bleskes committed Apr 8, 2013
1 parent 46b6449 commit e1810c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "Sense (beta)",
"description": "A JSON aware developer console to ElasticSearch.",
"version": "0.4",
"version": "0.5.0",

"icons": {
"16": "icons/logo16.png",
Expand Down
6 changes: 4 additions & 2 deletions src/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ function resetToValues(server, endpoint, method, data) {
function callES(server, endpoint, method, data, callback) {
if (server.indexOf("://") < 0) server = "http://" + server;
server = server.trim("/");
if (endpoint.charAt(0) === "/") endpoint = endpoint.substr(1);

console.log("Calling " + server + endpoint);
var url = server + "/" + endpoint;
console.log("Calling " + url);
$.ajax({
url: server + endpoint,
url: url,
data: data,
type: method,
complete: callback
Expand Down

0 comments on commit e1810c8

Please sign in to comment.