@igea/oac_frontend 1.0.47 → 1.0.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@igea/oac_frontend",
3
- "version": "1.0.47",
3
+ "version": "1.0.48",
4
4
  "description": "Frontend service for the OAC project",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -0,0 +1,23 @@
1
+ const express = require('express');
2
+ const router = express.Router();
3
+ const DataModel = require('../models/DataModel');
4
+
5
+ module.exports = function(serviceName) {
6
+ /**
7
+ * @route GET /users/manage: redirect to the users page with list of users
8
+ */
9
+ router.get('/new', (req, res) => {
10
+ let data = new DataModel(req, {
11
+ root: serviceName,
12
+ title: 'Ivestigation Creation',
13
+ currentPath: req.baseUrl +req.path,
14
+ });
15
+ res.render('investigation/new.twig', data.toJson());
16
+ });
17
+
18
+ return router
19
+ }
20
+
21
+
22
+
23
+
package/src/index.js CHANGED
@@ -88,6 +88,9 @@ getPort.default({
88
88
  const introductionRouter = require('./controllers/introduction.js')(serviceName);
89
89
  app.use(`/${serviceName}/introduction`, introductionRouter);
90
90
 
91
+ const investigationRouter = require('./controllers/investigation.js')(serviceName);
92
+ app.use(`/${serviceName}/investigation`, investigationRouter);
93
+
91
94
  const captchaRouter = require('./controllers/captcha.js');
92
95
  app.use(`/${serviceName}/captcha`, captchaRouter);
93
96
  // ---------------------------------------------------------------------