/**
|
* Route Mappings
|
* (sails.config.routes)
|
*
|
* Your routes map URLs to views and controllers.
|
*
|
* If Sails receives a URL that doesn't match any of the routes below,
|
* it will check for matching files (images, scripts, stylesheets, etc.)
|
* in your assets directory. e.g. `http://localhost:1337/images/foo.jpg`
|
* might match an image file: `/assets/images/foo.jpg`
|
*
|
* Finally, if those don't match either, the default 404 handler is triggered.
|
* See `api/responses/notFound.js` to adjust your app's 404 logic.
|
*
|
* Note: Sails doesn't ACTUALLY serve stuff from `assets`-- the default Gruntfile in Sails copies
|
* flat files from `assets` to `.tmp/public`. This allows you to do things like compile LESS or
|
* CoffeeScript for the front-end.
|
*
|
* For more information on configuring custom routes, check out:
|
* http://sailsjs.org/#/documentation/concepts/Routes/RouteTargetSyntax.html
|
*/
|
|
module.exports.routes = {
|
|
/**
|
* Root
|
*/
|
"GET /": "TurboFurnviewController.index", // default index page
|
|
/**
|
* Local Furnview
|
*/
|
"GET /start/:customerNo?": "LocalFurnviewController.start", // start page
|
"GET /local/get-furnplan-data": "LocalFurnviewController.getFurnplanData", // query furplan data (projects path etc.)
|
"GET /local/:customerNo?": "LocalFurnviewController.index", // default index page for local furnview
|
|
/*
|
* Authentication via OAuth2 / OpenID Connect
|
*/
|
"GET /auth/login": "AuthenticationController.login", // redirect to oauth authorization server
|
"GET /auth/logout": "AuthenticationController.logout", // redirect to oauth authorization server
|
"GET /auth/login/callback": "AuthenticationController.callback", // oauth login callback
|
"POST /auth/logout/back-channel": "AuthenticationController.backchannelLogout", // oauth back channel logout
|
|
/**
|
* Authentication via Opus
|
*/
|
"GET /login": "AuthenticationController.login",
|
"POST /login": "AuthenticationController.login_form",
|
"POST /logout": "AuthenticationController.logout",
|
|
/**
|
* Nice try dude
|
*/
|
"GET /nice-try-dude": "NiceTryDudeController.index",
|
|
/**
|
* Classic pre generated Furnview
|
*/
|
"GET /classic": "HomeController.index",
|
|
/**
|
* HomeViewer
|
*/
|
"GET r|^/homeviewer/([A-Fa-f0-9]{8}-([A-Fa-f0-9]{4}-){3}[A-Fa-f0-9]{12})$|guid": "HomeviewerController.guid", // serve uploaded file by guid,
|
"GET r|^/homeviewer/([a-z0-9]{8})$|guid": "HomeviewerController.guid", // serve uploaded file by cloud id
|
|
"GET r|^/shareviewer/([A-Fa-f0-9]{8}-([A-Fa-f0-9]{4}-){3}[A-Fa-f0-9]{12})$|guid": { // serve uploaded file by guid for viewing purposes only
|
controller: "homeviewer",
|
action: "guid",
|
readOnly: true
|
},
|
|
"GET /homeviewer/form": "HomeviewerController.form", // form for viewer page
|
"POST /homeviewer/form": "HomeviewerController.form_post", // form action
|
"POST /homeviewer/send-request": "HomeviewerController.sendRequest", // send request to dealer
|
"POST /homeviewer/share-by-mail": "HomeviewerController.shareByMail", // forward planning to email
|
|
/**
|
* Webviewer
|
*/
|
"GET /webviewer": "WebviewerController.view", // article viewer page for a webshop
|
"POST /webviewer/share-by-mail": "WebviewerController.shareByMail",
|
|
/**
|
* WebUIViewer
|
*/
|
"POST /webui/sendRequestMail": "WebUIController.sendRequestMail",
|
"GET /webui/projects": "WebUIController.getProjectList",
|
"GET /webui/projects/layouts": "WebUIController.getLayoutsList",
|
"GET /webui": "WebUIController.view",
|
"GET /webui/fetchConfiguration": "WebUIController.fetchConfiguration",
|
"GET /webui/exists": "WebUIController.exists",
|
"GET /webui/readSample/:sample": "WebUIController.readSample",
|
"GET /webui/readSample/:project/:sample": "WebUIController.readSample",
|
"GET /webui/readConfig/:project/:file": "WebUIController.readConfiguration",
|
"GET /webui/readConfig/:project": "WebUIController.readConfiguration",
|
"GET /webui/readConfig": "WebUIController.readConfiguration",
|
"PUT /webui/saveConfig/:project/:file": "WebUIController.saveConfiguration",
|
"PUT /webui/saveConfig/:project": "WebUIController.saveConfiguration",
|
"PUT /webui/saveConfig": "WebUIController.saveConfiguration",
|
|
"PUT /webui/upload/:project/:fileType": "WebUIController.uploadFile",
|
"PUT /webui/upload/:fileType": "WebUIController.uploadFile",
|
|
"GET /webui/:project/locales/:locale.json": "WebUIController.readLocalesJSON",
|
"GET /webui/:global/:theme/locales/:locale.json": "WebUIController.readLocalesJSON",
|
|
/**
|
* WITH TOKEN
|
*/
|
"GET r|^/webui-content/([\\w\\d]+)/(_\\d+)/([\\w\\d/_\\-\\.\%]+)$|token,project,path": "WebUIController.readFile",
|
"GET r|^/webui-content/([\\w\\d]+)/(\\w)/([\\d\\w_]+)/([\\w\\d/_\\-\\.\%]+)$|token,global,project,path": "WebUIController.readFile",
|
"GET r|^/webui-content/([\\w\\d]+)/([\\w\\d/_\\-\\.\%]+)$|token,path": "WebUIController.readFile",
|
|
"GET r|^/webui/(_\\d+)/themeConfig$|project": "WebUIController.readThemeConfig",
|
"GET r|^/webui/(\\w)/([\\d\\w_]+)/themeConfig$|global,project": "WebUIController.readThemeConfig",
|
"GET r|^/webui/(\\w)/([\\d\\w_]+)/config/layout.json$|global,project": "WebUIController.readLayoutConfig",
|
"GET r|^/webui/(\\w)/([\\d\\w_]+)/config/styles.json$|global,project": "WebUIController.readLayoutStylings",
|
"GET r|^/webui/(_\\d+)/([\\w\\d/_\\-\\.\%]+)$|project,path": "WebUIController.readFile",
|
"GET r|^/webui/(\\w)/([\\d\\w_]+)/([\\w\\d/_\\-\\.\%]+)$|global,project,path": "WebUIController.readFile",
|
"GET r|^/webui/([\\w\\d/_\\-\\.\%]+)$|path": "WebUIController.readFile",
|
|
|
/**
|
* FurncloudShortUrl
|
*/
|
"POST /furncloud-short-urls": "FurncloudShortUrlController.create",
|
"POST /furncloud-article-config-short-urls": "FurncloudShortUrlController.createArticleConfig",
|
|
/**
|
* FurniMobile
|
*/
|
"GET /furni-mobile": "FurniMobileController.view", // article viewer page for integration in FurniMobile
|
"GET /embedded": "FurniMobileController.view", // article viewer page for integration in other apps (formerly furni mobile)
|
|
/*
|
* ProtectedAssets
|
*/
|
"GET /assets/ausf-images/:manu/:prog/:progProp/:prop": "ProtectedAssetsController.assets_ausf_images", // ausf-images assets
|
"GET r|^/assets/(\\w+)/_global/tables/(.*.json)$|manu,filename": "ProtectedAssetsController.assets_finish_texts", // ausf-images assets
|
"GET /assets/:manu/:prog/articles/:filename": "ProtectedAssetsController.article", // article json
|
"GET /assets/:manu/:prog/:type/:filename": "ProtectedAssetsController.assets", // assets (images, textures etc.)
|
"GET /dhmc/:filename": "ProtectedAssetsController.dhmc", // dhmc client logic
|
"GET /dhmc/:folderName/:filename": "ProtectedAssetsController.dhmcFolder", // dhmc client logic
|
"GET /dhmc/FurnMod/:fm/:filename": "ProtectedAssetsController.dhmcFolder", // dhmc client logic
|
"GET /dhmc/config/walls/:filename": "ProtectedAssetsController.walls", // dmhc client logic
|
"GET /dhmc/config/ncs/:filename": "ProtectedAssetsController.ncs", // dmhc client logic
|
"GET /dhmc/wrapper/:filename": "ProtectedAssetsController.wrapper", // dmhc client logic
|
"GET /dhmc/wrapper/modules/:filename": "ProtectedAssetsController.modules", // dmhc client logic
|
"GET /dhmc/DHMaterialNodes/:filename": "ProtectedAssetsController.dhMaterialNodes", // dmhc client logic
|
"GET /modules/css/:style": "ProtectedAssetsController.modulesStyle",
|
"GET /uploads/:domain/:dir/:filename": "ProtectedAssetsController.uploads", // uploaded files
|
"GET /uploads/:domain/:dir/:manu/:prog/:tables/:filename": "ProtectedAssetsController.finishGroups",
|
/*
|
* Language
|
*/
|
"GET /lang/:key": "LanguageController.get",
|
"GET /lang/get-language/:languageId": {
|
controller: "LanguageController",
|
action: "getLanguage",
|
cors: true
|
},
|
"POST /lang/set-language": "LanguageController.setLanguage",
|
|
/*
|
* Fonts
|
*/
|
"GET /fonts": "FontController.index",
|
|
// /**
|
// * manufacturers
|
// */
|
// "GET /manufacturer": "ManufacturerController.index",
|
//
|
// /**
|
// * programs
|
// */
|
// "GET /program/:manufacturer": "ProgramController.index",
|
//
|
// /**
|
// * properties
|
// */
|
// "GET /properties/:manufacturer/:program": "PropertiesController.index",
|
//
|
|
/**
|
* Article Url Configurator
|
*/
|
"GET /auc": "LinkGeneratorController.index",
|
"GET /article-url-configurator": "LinkGeneratorController.index",
|
"GET /article-url-configurator/encrypt-article": "LinkGeneratorController.encryptArticle",
|
"GET /article-url-configurator/encrypt-buying-group": "LinkGeneratorController.encryptBuyingGroup",
|
"GET /article-url-configurator/encrypt-parameter": "LinkGeneratorController.encryptParameter",
|
"GET /article-url-configurator/get-sub-stores/:customerNo": "LinkGeneratorController.getSubStores",
|
|
/**
|
* katatree categories
|
*/
|
"GET /article-url-configurator/:type/:manufacturer/:level1/:level2": "ArticleUrlConfiguratorController.index",
|
"GET /article-url-configurator/:type/:manufacturer/:programOrLevel1": "ArticleUrlConfiguratorController.index",
|
"GET /article-url-configurator/:type/:manufacturer": "ArticleUrlConfiguratorController.index",
|
"GET /article-url-configurator/:type": "ArticleUrlConfiguratorController.index",
|
|
// /**
|
// * categories
|
// */
|
// "GET /categoryDef/:manufacturer/:program": "CategoryDefController.index",
|
|
|
/**
|
* articles
|
*/
|
|
// has to be before GET /article/:id, otherwise routes will be interpreted as an id
|
"GET /article/count": "ArticleController.count",
|
"POST /article/writeNames": "ArticleController.writeNames",
|
|
"GET /article": "ArticleController.index",
|
"POST /article": "ArticleController.create",
|
"GET /article/:id": "ArticleController.read",
|
"PUT /article/:id": "ArticleController.update",
|
"DELETE /article/:id": "ArticleController.destroy",
|
|
/**
|
* varticles
|
*/
|
"POST /varticle/:number": "VArticleController.create",
|
"GET /varticle/:id": "VArticleController.read",
|
"PUT /varticle/:id": "VArticleController.update",
|
"DELETE /varticle/:id": "VArticleController.destroy",
|
|
|
/**
|
* vprog
|
*/
|
"POST /vprog": "VProgramController.create",
|
"GET /vprog/:id": "VProgramController.read",
|
"PUT /vprog/:id": "VProgramController.update",
|
"DELETE /vprog/:id": "VProgramController.destroy",
|
|
/**
|
* Use case configurations
|
*/
|
"GET /use-case-configuration": "UseCaseConfigurationController.index",
|
"POST /use-case-configuration": "UseCaseConfigurationController.create",
|
"GET /use-case-configuration/:id": "UseCaseConfigurationController.read",
|
"PUT /use-case-configuration/:id": "UseCaseConfigurationController.update",
|
"DELETE /use-case-configuration/:id": "UseCaseConfigurationController.destroy",
|
"GET /use-case-configuration/download/:id": "UseCaseConfigurationController.download",
|
"GET /use-case-configuration/export/:id": "UseCaseConfigurationController.export",
|
"POST /use-case-configuration/import": "UseCaseConfigurationController.import",
|
|
/**
|
* PrintProperties
|
*/
|
"GET /print/properties": "DynamicSettingController.index",
|
"POST /print/properties": "DynamicSettingController.create",
|
"GET /print/properties/:id": "DynamicSettingController.read",
|
"PUT /print/properties/:id": "DynamicSettingController.update",
|
"DELETE /print/properties/:id": "DynamicSettingController.destroy",
|
|
/**
|
* InitialPlanning
|
*/
|
"GET /initial-plannings": "InitialPlanningController.index",
|
"POST /initial-plannings": "InitialPlanningController.create",
|
"GET /initial-plannings/:id": "InitialPlanningController.read",
|
"PUT /initial-plannings/:id": "InitialPlanningController.update",
|
"DELETE /initial-plannings/:id": "InitialPlanningController.destroy",
|
|
/**
|
* LayoutConfigurations
|
*/
|
"GET /layout-configurations/:level": "LayoutConfigurationsController.index",
|
"POST /layout-configurations/:level": "LayoutConfigurationsController.create",
|
"GET /layout-configurations/:level/:id": "LayoutConfigurationsController.read",
|
"PUT /layout-configurations/:level/:id": "LayoutConfigurationsController.update",
|
"DELETE /layout-configurations/:level/:id": "LayoutConfigurationsController.destroy",
|
|
/**
|
* LayoutStylings
|
*/
|
"GET /layout-stylings": "LayoutStylingsController.index",
|
"POST /layout-stylings": "LayoutStylingsController.create",
|
"GET /layout-stylings/:id": "LayoutStylingsController.read",
|
"PUT /layout-stylings/:id": "LayoutStylingsController.update",
|
"DELETE /layout-stylings/:id": "LayoutStylingsController.destroy",
|
|
/**
|
* NoticeList
|
*/
|
"GET /notice-list": "NoticeListController.index",
|
"POST /notice-list": "NoticeListController.create",
|
// "GET /notice-list/:id": "NoticeListController.read",
|
// "PUT /notice-list/:id": "NoticeListController.update",
|
"DELETE /notice-list/:id": "NoticeListController.destroy",
|
|
/**
|
* CustomPDFController
|
*/
|
"GET r|^/custom-pdf/([A-Fa-f0-9]{8}-([A-Fa-f0-9]{4}-){3}[A-Fa-f0-9]{12})/([a-f0-9]{32})$|pdf_id,a,md5": "CustomPDFController.download",
|
"POST /custom-pdf": "CustomPDFController.upload",
|
"DELETE r|^/custom-pdf/([A-Fa-f0-9]{8}-([A-Fa-f0-9]{4}-){3}[A-Fa-f0-9]{12})/([a-f0-9]{32})$|pdf_id,a,md5": "CustomPDFController.destroy",
|
|
|
/**
|
* AccessListSetting
|
*/
|
"GET /config/accesslist-setting": "AccessListSettingController.index",
|
"POST /config/accesslist-setting": "AccessListSettingController.create",
|
"GET /config/accesslist-setting/:id": "AccessListSettingController.read",
|
"PUT /config/accesslist-setting/:id": "AccessListSettingController.update",
|
"DELETE /config/accesslist-setting/:id": "AccessListSettingController.destroy",
|
|
/**
|
* PropertyOrderListSetting
|
*/
|
"GET /propertyOrderList": "PropertyOrderListController.index",
|
"POST /propertyOrderList": "PropertyOrderListController.create",
|
"GET /propertyOrderList/:id": "PropertyOrderListController.read",
|
"PUT /propertyOrderList/:id": "PropertyOrderListController.update",
|
"DELETE /propertyOrderList/:id": "PropertyOrderListController.destroy",
|
|
/**
|
* HRConfiguratorController
|
*/
|
"GET /hr-configurator": "HRConfiguratorController.view",
|
|
/**
|
* HRThemeSettingController
|
*/
|
"GET /hr-theme-setting": "HRThemeSettingController.index",
|
"POST /hr-theme-setting": "HRThemeSettingController.create",
|
"GET /hr-theme-setting/:id": "HRThemeSettingController.read",
|
"PUT /hr-theme-setting/:id": "HRThemeSettingController.update",
|
"DELETE /hr-theme-setting/:id": "HRThemeSettingController.destroy",
|
|
/**
|
* CategorySettingController
|
*/
|
"GET /article-url-configurator/categoryDef": "ArticleUrlConfiguratorController.index",
|
"GET /categoryDef": "CategorySettingController.index",
|
"POST /categoryDef": "CategorySettingController.create",
|
"GET /categoryDef/:id": "CategorySettingController.read",
|
"PUT /categoryDef/:id": "CategorySettingController.update",
|
"DELETE /categoryDef/:id": "CategorySettingController.destroy",
|
|
/**
|
* DefaultArticleListSetting
|
*/
|
"GET /defaultArticleList": "DefaultArticleListController.index",
|
"POST /defaultArticleList": "DefaultArticleListController.create",
|
"GET /defaultArticleList/:id": "DefaultArticleListController.read",
|
"PUT /defaultArticleList/:id": "DefaultArticleListController.update",
|
"DELETE /defaultArticleList/:id": "DefaultArticleListController.destroy",
|
|
/**
|
* LandingPage
|
*/
|
"GET /landingpage": "LandingPageController.index",
|
"POST /landingpage": "LandingPageController.create",
|
"GET /landingpage/:id": "LandingPageController.read",
|
"PUT /landingpage/:id": "LandingPageController.update",
|
"DELETE /landingpage/:id": "LandingPageController.destroy",
|
|
/**
|
* LandingPage
|
*/
|
"GET /landingpageelement": "LandingPageElementController.index",
|
"POST /landingpageelement": "LandingPageElementController.create",
|
"POST /landingpageelement/createChild": "LandingPageElementController.createChild",
|
"POST /landingpageelement/upload": "LandingPageElementController.upload",
|
"POST /landingpageelement/deleteFile": "LandingPageElementController.deleteFile",
|
"GET /landingpageelement/image/:filename": "LandingPageElementController.loadImage",
|
"GET /landingpageelement/planning/:id": "LandingPageElementController.loadPlanning",
|
"GET /landingpageelement/:id": "LandingPageElementController.read",
|
"PUT /landingpageelement/:id": "LandingPageElementController.update",
|
"DELETE /landingpageelement/:id": "LandingPageElementController.destroy",
|
|
"GET /definition/": "DefinitionController.index",
|
"GET /definition/:name": "DefinitionController.read",
|
|
/**
|
* hybrid reality themes
|
*/
|
"GET /hr-theme-old": "HybridRealityThemeController.oldIndex",
|
"GET /hr-theme-old/:id": "HybridRealityThemeController.oldRead",
|
|
"GET /hr-theme": "HybridRealityThemeController.index",
|
"GET /hr-image/:id": "HybridRealityThemeController.getImage",
|
"POST /hr-theme": "HybridRealityThemeController.create",
|
"POST /hr-theme/:id": "HybridRealityThemeController.update",
|
"DELETE /hr-theme/:id": "HybridRealityThemeController.delete",
|
|
/**
|
* catalogue
|
*/
|
"GET /catalogue": "CatalogueController.catalogue",
|
|
/**
|
* Furnplan node
|
*/
|
"GET /furnplan_node": "FurnplanNodeController.get",
|
"DELETE /furnplan_node": "FurnplanNodeController.destroyAll",
|
"DELETE /furnplan_node/:sessionId": "FurnplanNodeController.destroy",
|
|
|
"GET /freeze_furnplan_node": "FurnplanNodeController.freeze",
|
"GET /unfreeze_furnplan_node": "FurnplanNodeController.unfreeze",
|
|
"POST /dhlog/info": "LogController.info",
|
"POST /dhlog/error": "LogController.error",
|
"POST /dhlog/warning": "LogController.warning",
|
"GET /dhlog/fatal/:key": "LogController.kill",
|
|
/*
|
* RB64 service
|
*/
|
"GET /rest/obfuscate/encode": "RB64Controller.encode",
|
|
/**
|
* User Registry service
|
*/
|
"GET /rest/user-registries/:userId": "UserRegistryController.get",
|
"POST /rest/user-registries/:userId/set-value": "UserRegistryController.setValue",
|
|
/**
|
* Mailer service
|
*/
|
"POST /mail/finish-planning": "MailController.finishPlanning",
|
"POST /mail/send-configurated-mail": "MailController.sendConfiguratedMail",
|
|
"GET /DHdbg": "DebuggingController.view",
|
"GET /DHValueDebug": "DebuggingController.valueDebug",
|
"GET /DHMat": "DebuggingController.materials",
|
|
"GET /unsupported": "ErrorController.unsupported",
|
|
"POST /appBehavior": "ApplicationBehaviorController.update",
|
|
/**
|
* Control Delegation
|
*/
|
"POST /control-delegation": "ControlDelegationController.delegate",
|
|
/*
|
* Customer Controller
|
*/
|
"GET /customer/get-store-tree": "CustomerController.getStoreTree",
|
|
/**
|
* Project Manager
|
*/
|
"GET /project-manager/public": "ProjectManagerController.index",
|
"GET /project-manager/public/:file": "ProjectManagerController.public",
|
|
/**
|
* Re Captcha
|
*/
|
"POST /re-captcha/check": "ReCaptchaController.check",
|
|
/**
|
* Orders
|
*/
|
"GET /orders/get-number": "OrderController.getOrderNumber",
|
|
"GET /ar/form": "ARViewerController.form", // form for viewer page
|
"POST /ar/form": "ARViewerController.form_post", // form action
|
|
"GET r|^/ar/([a-z0-9]{8})$|guid": "ARViewerController.export",
|
"GET r|^/ar-viewer/([a-z0-9]{8})$|guid": "ARViewerController.view",
|
};
|