Refactor date wrapper

This commit is contained in:
elenatorro 2018-05-31 18:53:01 +02:00
parent db3370cd21
commit d4c6282455
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
const AggregationMapConfig = require('../../aggregation/aggregation-mapconfig');
const utilsService = require('../../../utils/get-column-types');
const dateWrapper = require('../../../utils/date-wrapper');
const queryUtils = require('../../../utils/query-utils');
// Generate query to detect time columns
@ -35,7 +35,7 @@ module.exports = class VectorMapConfigAdapter {
const originalQuery = requestMapConfig.layers[0].options.sql;
return this._getColumns(user, originalQuery)
.then(result => {
const newSqlQuery = utilsService.wrapDates(originalQuery, result.fields);
const newSqlQuery = dateWrapper.wrapDates(originalQuery, result.fields);
requestMapConfig.layers[0].options.sql = newSqlQuery;
return requestMapConfig;
});