Rename base paths
This commit is contained in:
@@ -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')
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user