server.ts: remove check for variables, to build css for connect

This commit is contained in:
argirok 2023-06-30 10:55:00 +03:00
parent 5ecda2ba44
commit fc44d3acb0
1 changed files with 0 additions and 8 deletions

View File

@ -186,25 +186,17 @@ export function app() {
server.post('/build-css/:id/:suffix', jsonParser,(req, res) => {
let variables = Layout.getVariables(CustomizationOptions.checkForObsoleteVersion(req.body, req.params.id));
if (variables) {
buildCss(req.params.id , req.params.suffix, variables);
res.status(200).send({
code: 200,
message: 'CSS build for ' + req.params.id + ' layout was successful'
});
} else {
res.status(500).send({code: 500, message: 'No variables found'});
}
});
server.post('/build-css/preview/:id/:suffix', jsonParser, (req, res) => {
let variables = Layout.getVariables(CustomizationOptions.checkForObsoleteVersion(req.body, req.params.id));
if (variables) {
buildCss(req.params.id, req.params.suffix, variables);
res.status(200).send({code: 200, message: 'CSS build for ' + req.params.id + ' layout was successful'});
} else {
res.status(500).send({code: 500, message: 'No layout found'});
}
});
// Example Express Rest API endpoints
// server.get('/api/**', (req, res) => { });