|
|
@@ -7,6 +7,8 @@ import BaseController from "../../common/base/base_controller";
|
|
|
const projectModel = require("../../pm/models/project_model");
|
|
|
const pmFacade = require('../../pm/facade/pm_facade');
|
|
|
let config = require("../../../config/config.js");
|
|
|
+import OptionsDao from '../../options/models/optionsModel';
|
|
|
+import optionSetting from '../../options/models/optionTypes';
|
|
|
module.exports =function (app) {
|
|
|
const baseController = new BaseController();
|
|
|
app.get('/main', baseController.init, function(req, res) {
|
|
|
@@ -28,6 +30,12 @@ module.exports =function (app) {
|
|
|
if (constructProject && constructProject.property && constructProject.property.fileKind) {
|
|
|
fileKind = constructProject.property.fileKind;
|
|
|
}
|
|
|
+ let optionsDao = new OptionsDao();
|
|
|
+ let options = await optionsDao.getOptions(req.session.sessionUser.id, req.session.sessionCompilation._id);
|
|
|
+ if(options){
|
|
|
+ options = await optionsDao.saveOptions(req.session.sessionUser.id, req.session.sessionCompilation._id, optionSetting);
|
|
|
+ }
|
|
|
+
|
|
|
res.render('building_saas/main/html/main.html',
|
|
|
{
|
|
|
userAccount: req.session.userAccount,
|
|
|
@@ -39,7 +47,8 @@ module.exports =function (app) {
|
|
|
projectCooperate: projectCooperate,
|
|
|
LicenseKey:config.getLicenseKey(process.env.NODE_ENV),
|
|
|
overWriteUrl:req.session.sessionCompilation.overWriteUrl,
|
|
|
- fileKind: fileKind
|
|
|
+ fileKind: fileKind,
|
|
|
+ options:JSON.stringify(options)
|
|
|
});
|
|
|
} else {
|
|
|
res.redirect('/pm');
|