Uses backend-foundations branch to use createLayergroup from backend

This commit is contained in:
Raul Ochoa 2015-06-29 18:58:58 +02:00
parent 837da45f4f
commit 4f87796e9c
5 changed files with 23 additions and 18 deletions

View File

@ -164,6 +164,7 @@ var CartodbWindshaft = function(serverOptions) {
serverOptions,
templateMaps,
cartoData,
ws.mapBackend,
template_baseurl,
surrogateKeysCache
);
@ -177,6 +178,7 @@ var CartodbWindshaft = function(serverOptions) {
ws,
serverOptions,
templateMaps,
ws.mapBackend,
ws.staticMapBackend,
surrogateKeysCache,
tablesExtentApi

View File

@ -5,11 +5,13 @@ var templateName = require('../backends/template_maps').templateName;
var CdbRequest = require('../models/cdb_request');
var NamedMapsCacheEntry = require('../cache/model/named_maps_entry');
function NamedMapsController(app, serverOptions, templateMaps, metadataBackend, templateBaseUrl, surrogateKeysCache) {
function NamedMapsController(app, serverOptions, templateMaps, metadataBackend, mapBackend, templateBaseUrl,
surrogateKeysCache) {
this.app = app;
this.serverOptions = serverOptions;
this.templateMaps = templateMaps;
this.metadataBackend = metadataBackend;
this.mapBackend = mapBackend;
this.templateBaseUrl = templateBaseUrl;
this.surrogateKeysCache = surrogateKeysCache;
}
@ -317,7 +319,7 @@ NamedMapsController.prototype.instantiateTemplate = function(req, res, template_
if ( req.profiler ) req.profiler.done('getUserMapKey');
if ( err ) throw err;
fakereq.params.api_key = val;
self.app.createLayergroup(layergroup, fakereq, this);
self.mapBackend.createLayergroup(layergroup, fakereq, this);
},
function prepareResponse(err, layergroup) {
if ( err ) {

View File

@ -5,11 +5,12 @@ var CdbRequest = require('../models/cdb_request');
var NamedMapsCacheEntry = require('../cache/model/named_maps_entry');
var _ = require('underscore');
function NamedStaticMapsController(app, serverOptions, templateMaps, staticMapBackend, surrogateKeysCache,
function NamedStaticMapsController(app, serverOptions, templateMaps, mapBackend, staticMapBackend, surrogateKeysCache,
tablesExtentApi) {
this.app = app;
this.serverOptions = serverOptions;
this.templateMaps = templateMaps;
this.mapBackend = mapBackend;
this.staticMapBackend = staticMapBackend;
this.surrogateKeysCache = surrogateKeysCache;
this.tablesExtentApi = tablesExtentApi;
@ -114,7 +115,7 @@ NamedStaticMapsController.prototype.named = function(req, res) {
},
function setApiKey(err){
assert.ifError(err);
self.app.createLayergroup(layergroupConfig, fakeReq, this);
self.mapBackend.createLayergroup(layergroupConfig, fakeReq, this);
},
function prepareResponse(err, layergroup) {
assert.ifError(err);

26
npm-shrinkwrap.json generated
View File

@ -134,19 +134,19 @@
"resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc1.tgz",
"dependencies": {
"async": {
"version": "1.2.1",
"version": "1.3.0",
"from": "async@^1.2.1",
"resolved": "https://registry.npmjs.org/async/-/async-1.2.1.tgz"
"resolved": "https://registry.npmjs.org/async/-/async-1.3.0.tgz"
},
"mime-types": {
"version": "2.1.1",
"version": "2.1.2",
"from": "mime-types@^2.1.1",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.1.tgz",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.2.tgz",
"dependencies": {
"mime-db": {
"version": "1.13.0",
"from": "mime-db@~1.13.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.13.0.tgz"
"version": "1.14.0",
"from": "mime-db@~1.14.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.14.0.tgz"
}
}
}
@ -271,13 +271,13 @@
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz"
},
"har-validator": {
"version": "1.7.1",
"version": "1.8.0",
"from": "har-validator@^1.6.1",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-1.7.1.tgz",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-1.8.0.tgz",
"dependencies": {
"bluebird": {
"version": "2.9.30",
"from": "bluebird@^2.9.26",
"from": "bluebird@^2.9.30",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.9.30.tgz"
},
"chalk": {
@ -491,9 +491,9 @@
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz"
},
"windshaft": {
"version": "0.45.0",
"from": "windshaft@0.45.0",
"resolved": "https://registry.npmjs.org/windshaft/-/windshaft-0.45.0.tgz",
"version": "0.45.1",
"from": "https://github.com/CartoDB/Windshaft/tarball/backend-foundations",
"resolved": "https://github.com/CartoDB/Windshaft/tarball/backend-foundations",
"dependencies": {
"chronograph": {
"version": "0.1.0",

View File

@ -24,7 +24,7 @@
"dependencies": {
"underscore" : "~1.6.0",
"dot": "~1.0.2",
"windshaft": "0.45.0",
"windshaft": "https://github.com/CartoDB/Windshaft/tarball/backend-foundations",
"step": "~0.0.5",
"queue-async": "~1.0.7",
"request": "~2.9.203",