Pass only needed params to named map map config provider
This commit is contained in:
parent
8523875349
commit
afc608fc5d
@ -242,7 +242,11 @@ function getTemplate (
|
|||||||
) {
|
) {
|
||||||
return function getTemplateMiddleware (req, res, next) {
|
return function getTemplateMiddleware (req, res, next) {
|
||||||
const templateParams = req.body;
|
const templateParams = req.body;
|
||||||
const { user } = res.locals;
|
const { user, dbuser, dbname, dbpassword, dbhost, dbport } = res.locals;
|
||||||
|
const { template_id } = req.params;
|
||||||
|
const { auth_token } = req.query;
|
||||||
|
|
||||||
|
const params = { dbuser, dbname, dbpassword, dbhost, dbport };
|
||||||
|
|
||||||
const mapConfigProvider = new NamedMapMapConfigProvider(
|
const mapConfigProvider = new NamedMapMapConfigProvider(
|
||||||
templateMaps,
|
templateMaps,
|
||||||
@ -252,10 +256,10 @@ function getTemplate (
|
|||||||
mapConfigAdapter,
|
mapConfigAdapter,
|
||||||
affectedTablesCache,
|
affectedTablesCache,
|
||||||
user,
|
user,
|
||||||
req.params.template_id,
|
template_id,
|
||||||
templateParams,
|
templateParams,
|
||||||
res.locals.auth_token,
|
auth_token,
|
||||||
res.locals
|
params
|
||||||
);
|
);
|
||||||
|
|
||||||
mapConfigProvider.getMapConfig((err, mapConfig, rendererParams) => {
|
mapConfigProvider.getMapConfig((err, mapConfig, rendererParams) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user