Rename base paths

This commit is contained in:
Daniel García Aubert
2018-03-16 13:04:42 +01:00
parent 5ede6c3021
commit 071a5a4bdf
5 changed files with 32 additions and 28 deletions
+7 -7
View File
@@ -18,10 +18,10 @@ function NamedMapsAdminController(authApi, templateMaps) {
module.exports = NamedMapsAdminController;
NamedMapsAdminController.prototype.register = function (app) {
const { base_url_templated } = app;
const { base_url_templated: templateBasePath } = app;
app.post(
`${base_url_templated}/`,
`${templateBasePath}/`,
cors(),
userMiddleware(),
localsMiddleware(),
@@ -33,7 +33,7 @@ NamedMapsAdminController.prototype.register = function (app) {
);
app.put(
`${base_url_templated}/:template_id`,
`${templateBasePath}/:template_id`,
cors(),
userMiddleware(),
localsMiddleware(),
@@ -45,7 +45,7 @@ NamedMapsAdminController.prototype.register = function (app) {
);
app.get(
`${base_url_templated}/:template_id`,
`${templateBasePath}/:template_id`,
cors(),
userMiddleware(),
localsMiddleware(),
@@ -56,7 +56,7 @@ NamedMapsAdminController.prototype.register = function (app) {
);
app.delete(
`${base_url_templated}/:template_id`,
`${templateBasePath}/:template_id`,
cors(),
userMiddleware(),
localsMiddleware(),
@@ -67,7 +67,7 @@ NamedMapsAdminController.prototype.register = function (app) {
);
app.get(
`${base_url_templated}/`,
`${templateBasePath}/`,
cors(),
userMiddleware(),
localsMiddleware(),
@@ -78,7 +78,7 @@ NamedMapsAdminController.prototype.register = function (app) {
);
app.options(
`${base_url_templated}/:template_id`,
`${templateBasePath}/:template_id`,
cors('Content-Type')
);
};