Use original variable name
This commit is contained in:
@@ -16,10 +16,10 @@ function NamedMapsAdminController(authApi, templateMaps) {
|
||||
module.exports = NamedMapsAdminController;
|
||||
|
||||
NamedMapsAdminController.prototype.register = function (app) {
|
||||
const prefix = app.base_url_templated;
|
||||
const { base_url_templated } = app;
|
||||
|
||||
app.post(
|
||||
`${prefix}/`,
|
||||
`${base_url_templated}/`,
|
||||
cors(),
|
||||
userMiddleware,
|
||||
this.checkContentType('POST', 'POST TEMPLATE'),
|
||||
@@ -28,7 +28,7 @@ NamedMapsAdminController.prototype.register = function (app) {
|
||||
);
|
||||
|
||||
app.put(
|
||||
`${prefix}/:template_id`,
|
||||
`${base_url_templated}/:template_id`,
|
||||
cors(),
|
||||
userMiddleware,
|
||||
this.checkContentType('PUT', 'PUT TEMPLATE'),
|
||||
@@ -37,7 +37,7 @@ NamedMapsAdminController.prototype.register = function (app) {
|
||||
);
|
||||
|
||||
app.get(
|
||||
`${prefix}/:template_id`,
|
||||
`${base_url_templated}/:template_id`,
|
||||
cors(),
|
||||
userMiddleware,
|
||||
this.authorizedByAPIKey('get', 'GET TEMPLATE'),
|
||||
@@ -45,7 +45,7 @@ NamedMapsAdminController.prototype.register = function (app) {
|
||||
);
|
||||
|
||||
app.delete(
|
||||
`${prefix}/:template_id`,
|
||||
`${base_url_templated}/:template_id`,
|
||||
cors(),
|
||||
userMiddleware,
|
||||
this.authorizedByAPIKey('delete', 'DELETE TEMPLATE'),
|
||||
@@ -53,7 +53,7 @@ NamedMapsAdminController.prototype.register = function (app) {
|
||||
);
|
||||
|
||||
app.get(
|
||||
`${prefix}/`,
|
||||
`${base_url_templated}/`,
|
||||
cors(),
|
||||
userMiddleware,
|
||||
this.authorizedByAPIKey('list', 'GET TEMPLATE LIST'),
|
||||
@@ -61,7 +61,7 @@ NamedMapsAdminController.prototype.register = function (app) {
|
||||
);
|
||||
|
||||
app.options(
|
||||
`${prefix}/:template_id`,
|
||||
`${base_url_templated}/:template_id`,
|
||||
cors('Content-Type')
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user