Do not use locals middleware in named maps admin controller
This commit is contained in:
parent
516b1f765e
commit
f7a23c094c
@ -1,7 +1,6 @@
|
||||
const { templateName } = require('../backends/template_maps');
|
||||
const cors = require('../middleware/cors');
|
||||
const user = require('../middleware/user');
|
||||
const locals = require('../middleware/locals');
|
||||
const credentials = require('../middleware/credentials');
|
||||
const rateLimit = require('../middleware/rate-limit');
|
||||
const { RATE_LIMIT_ENDPOINTS_GROUPS } = rateLimit;
|
||||
@ -27,7 +26,6 @@ NamedMapsAdminController.prototype.register = function (app) {
|
||||
app.post(
|
||||
`${templateBasePath}/`,
|
||||
cors(),
|
||||
locals(),
|
||||
user(),
|
||||
rateLimit(this.userLimitsApi, RATE_LIMIT_ENDPOINTS_GROUPS.NAMED_CREATE),
|
||||
credentials(),
|
||||
@ -40,7 +38,6 @@ NamedMapsAdminController.prototype.register = function (app) {
|
||||
app.put(
|
||||
`${templateBasePath}/:template_id`,
|
||||
cors(),
|
||||
locals(),
|
||||
user(),
|
||||
rateLimit(this.userLimitsApi, RATE_LIMIT_ENDPOINTS_GROUPS.NAMED_UPDATE),
|
||||
credentials(),
|
||||
@ -53,7 +50,6 @@ NamedMapsAdminController.prototype.register = function (app) {
|
||||
app.get(
|
||||
`${templateBasePath}/:template_id`,
|
||||
cors(),
|
||||
locals(),
|
||||
user(),
|
||||
rateLimit(this.userLimitsApi, RATE_LIMIT_ENDPOINTS_GROUPS.NAMED_GET),
|
||||
credentials(),
|
||||
@ -65,7 +61,6 @@ NamedMapsAdminController.prototype.register = function (app) {
|
||||
app.delete(
|
||||
`${templateBasePath}/:template_id`,
|
||||
cors(),
|
||||
locals(),
|
||||
user(),
|
||||
rateLimit(this.userLimitsApi, RATE_LIMIT_ENDPOINTS_GROUPS.NAMED_DELETE),
|
||||
credentials(),
|
||||
@ -77,7 +72,6 @@ NamedMapsAdminController.prototype.register = function (app) {
|
||||
app.get(
|
||||
`${templateBasePath}/`,
|
||||
cors(),
|
||||
locals(),
|
||||
user(),
|
||||
rateLimit(this.userLimitsApi, RATE_LIMIT_ENDPOINTS_GROUPS.NAMED_LIST),
|
||||
credentials(),
|
||||
|
Loading…
Reference in New Issue
Block a user