Added trailing slash to API endpoint in widget URLs
This commit is contained in:
parent
50e63bf83d
commit
7b57d22444
@ -349,13 +349,13 @@ function getUrls(username, resource) {
|
||||
var cdnUrl = global.environment.serverMetadata && global.environment.serverMetadata.cdn_url;
|
||||
if (cdnUrl) {
|
||||
return {
|
||||
http: 'http://' + cdnUrl.http + '/' + username + '/api/v1/map' + resource,
|
||||
https: 'https://' + cdnUrl.https + '/' + username + '/api/v1/map' + resource
|
||||
http: 'http://' + cdnUrl.http + '/' + username + '/api/v1/map/' + resource,
|
||||
https: 'https://' + cdnUrl.https + '/' + username + '/api/v1/map/' + resource
|
||||
};
|
||||
} else {
|
||||
var port = global.environment.port;
|
||||
return {
|
||||
http: 'http://' + username + '.' + 'localhost.lan:' + port + '/api/v1/map' + resource
|
||||
http: 'http://' + username + '.' + 'localhost.lan:' + port + '/api/v1/map/' + resource
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,12 @@ describe('lists', function() {
|
||||
return next(err);
|
||||
}
|
||||
var parsedBody = JSON.parse(res.body);
|
||||
var expectedWidgetURLS = {
|
||||
"http": "http://localhost.localhost.lan:8888" +
|
||||
"/api/v1/map/adfb1f912ddb9a5af5e9ef0b2229ed3b:1234567890123/0/widget/names"
|
||||
};
|
||||
assert.ok(parsedBody.metadata.layers[0].widgets.names);
|
||||
assert.equal(parsedBody.metadata.layers[0].widgets.names.url.http, expectedWidgetURLS.http);
|
||||
return next(null, parsedBody.layergroupid);
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user