Add stats first

This commit is contained in:
Daniel García Aubert 2018-07-16 16:58:53 +02:00
parent 9f9b933607
commit 81eb849aff
2 changed files with 2 additions and 2 deletions

View File

@ -197,8 +197,8 @@ function createLayergroup (mapBackend, userLimitsBackend, pgConnection, affected
const mapParams = { dbuser, dbname, dbpassword, dbhost, dbport };
mapBackend.createLayergroup(mapConfig, mapParams, mapConfigProvider, (err, layergroup, stats = {}) => {
req.profiler.done('createLayergroup');
req.profiler.add(stats);
req.profiler.done('createLayergroup');
if (err) {
return next(err);

View File

@ -193,8 +193,8 @@ function instantiateLayergroup (mapBackend, userLimitsBackend, pgConnection, aff
);
mapBackend.createLayergroup(mapConfig, rendererParams, mapConfigProvider, (err, layergroup, stats = {}) => {
req.profiler.done('createLayergroup');
req.profiler.add(stats);
req.profiler.done('createLayergroup');
if (err) {
return next(err);