Simplify URL for "static"

/styles/{id}/rendered/static/... -> /styles/{id}/static/...
This commit is contained in:
Petr Sloup 2016-04-22 15:50:56 +02:00
parent 287a632295
commit 54073cecce
2 changed files with 2 additions and 2 deletions

View file

@ -284,7 +284,7 @@ module.exports = function(options, repo, params, id) {
}); });
var staticPattern = var staticPattern =
'/rendered/static/%s:scale(' + SCALE_PATTERN + ')?\.:format([\\w]+)'; '/static/%s:scale(' + SCALE_PATTERN + ')?\.:format([\\w]+)';
var centerPattern = var centerPattern =
util.format(':lon(%s),:lat(%s),:z(\\d+):bearing(,%s)?:pitch(,%s)?/' + util.format(':lon(%s),:lat(%s),:z(\\d+):bearing(,%s)?:pitch(,%s)?/' +

View file

@ -1,6 +1,6 @@
var testStatic = function(prefix, q, format, status, scale, type) { var testStatic = function(prefix, q, format, status, scale, type) {
if (scale) q += '@' + scale + 'x'; if (scale) q += '@' + scale + 'x';
var path = '/styles/' + prefix + '/rendered/static/' + q + '.' + format; var path = '/styles/' + prefix + '/static/' + q + '.' + format;
it(path + ' returns ' + status, function(done) { it(path + ' returns ' + status, function(done) {
var test = supertest(app).get(path); var test = supertest(app).get(path);
if (status) test.expect(status); if (status) test.expect(status);