Rename map-store-map-config-provider middleware
This commit is contained in:
parent
faaf121eb6
commit
6c2f893651
@ -47,7 +47,7 @@ LayergroupController.prototype.register = function(app) {
|
||||
cors(),
|
||||
userMiddleware(),
|
||||
this.prepareContext,
|
||||
getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
getTile(this.tileBackend, 'map_tile'),
|
||||
setCacheControlHeader(),
|
||||
setLastModifiedHeader(),
|
||||
@ -66,7 +66,7 @@ LayergroupController.prototype.register = function(app) {
|
||||
cors(),
|
||||
userMiddleware(),
|
||||
this.prepareContext,
|
||||
getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
getTile(this.tileBackend, 'map_tile'),
|
||||
setCacheControlHeader(),
|
||||
setLastModifiedHeader(),
|
||||
@ -86,7 +86,7 @@ LayergroupController.prototype.register = function(app) {
|
||||
cors(),
|
||||
userMiddleware(),
|
||||
this.prepareContext,
|
||||
getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
getTile(this.tileBackend, 'maplayer_tile'),
|
||||
setCacheControlHeader(),
|
||||
setLastModifiedHeader(),
|
||||
@ -105,7 +105,7 @@ LayergroupController.prototype.register = function(app) {
|
||||
cors(),
|
||||
userMiddleware(),
|
||||
this.prepareContext,
|
||||
getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
getFeatureAttributes(this.attributesBackend),
|
||||
setCacheControlHeader(),
|
||||
setLastModifiedHeader(),
|
||||
@ -123,7 +123,7 @@ LayergroupController.prototype.register = function(app) {
|
||||
userMiddleware(),
|
||||
allowQueryParams(['layer']),
|
||||
this.prepareContext,
|
||||
getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi, forcedFormat),
|
||||
createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi, forcedFormat),
|
||||
getPreviewImageByCenter(this.previewBackend),
|
||||
setCacheControlHeader(),
|
||||
setLastModifiedHeader(),
|
||||
@ -139,7 +139,7 @@ LayergroupController.prototype.register = function(app) {
|
||||
userMiddleware(),
|
||||
allowQueryParams(['layer']),
|
||||
this.prepareContext,
|
||||
getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi, forcedFormat),
|
||||
createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi, forcedFormat),
|
||||
getPreviewImageByBoundingBox(this.previewBackend),
|
||||
setCacheControlHeader(),
|
||||
setLastModifiedHeader(),
|
||||
@ -173,7 +173,7 @@ LayergroupController.prototype.register = function(app) {
|
||||
userMiddleware(),
|
||||
allowQueryParams(allowedDataviewQueryParams),
|
||||
this.prepareContext,
|
||||
getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
getDataview(this.dataviewBackend),
|
||||
setCacheControlHeader(),
|
||||
setLastModifiedHeader(),
|
||||
@ -189,7 +189,7 @@ LayergroupController.prototype.register = function(app) {
|
||||
userMiddleware(),
|
||||
allowQueryParams(allowedDataviewQueryParams),
|
||||
this.prepareContext,
|
||||
getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
getDataview(this.dataviewBackend),
|
||||
setCacheControlHeader(),
|
||||
setLastModifiedHeader(),
|
||||
@ -205,7 +205,7 @@ LayergroupController.prototype.register = function(app) {
|
||||
userMiddleware(),
|
||||
allowQueryParams(allowedDataviewQueryParams),
|
||||
this.prepareContext,
|
||||
getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
dataviewSearch(this.dataviewBackend),
|
||||
setCacheControlHeader(),
|
||||
setLastModifiedHeader(),
|
||||
@ -221,7 +221,7 @@ LayergroupController.prototype.register = function(app) {
|
||||
userMiddleware(),
|
||||
allowQueryParams(allowedDataviewQueryParams),
|
||||
this.prepareContext,
|
||||
getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi),
|
||||
dataviewSearch(this.dataviewBackend),
|
||||
setCacheControlHeader(),
|
||||
setLastModifiedHeader(),
|
||||
@ -282,8 +282,8 @@ function getRequestParams(locals) {
|
||||
return params;
|
||||
}
|
||||
|
||||
function getMapStoreMapConfigProvider (mapStore, userLimitsApi, forcedFormat = null) {
|
||||
return function getMapStoreMapConfigProviderMiddleware (req, res, next) {
|
||||
function createMapStoreMapConfigProvider (mapStore, userLimitsApi, forcedFormat = null) {
|
||||
return function createMapStoreMapConfigProviderMiddleware (req, res, next) {
|
||||
const { user } = res.locals;
|
||||
|
||||
const params = getRequestParams(res.locals);
|
||||
|
Loading…
Reference in New Issue
Block a user