@manyos/smileconnect-api 1.55.3 → 1.55.5
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/docs/releases.md +10 -0
- package/docs/scripts.md +2 -0
- package/package.json +1 -1
- package/routes/scriptRoutes.js +7 -3
- package/conf/scripts/p1.js +0 -11
package/docs/releases.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## API
|
|
4
4
|
|
|
5
|
+
### 1.55.5 - 03.03.22
|
|
6
|
+
Allow startup with broken SMILEconnect Adapter SSO Url.
|
|
7
|
+
|
|
8
|
+
### 1.55.4 - 02.03.22
|
|
9
|
+
Fix error when scripts with space in name are deleted
|
|
10
|
+
|
|
5
11
|
### 1.55.3 - 01.03.22
|
|
6
12
|
Ensure TTL of 0 disables cache for Remedy Adapter
|
|
7
13
|
|
|
@@ -170,6 +176,10 @@ The eventmanager will check all outbound webhooks for an event. If one fails, th
|
|
|
170
176
|
|
|
171
177
|
## GUI
|
|
172
178
|
|
|
179
|
+
### 1.8.2 - 2.3.22
|
|
180
|
+
Fixed: delete webhooks for client when client is deleted
|
|
181
|
+
Fixed: delete button / menu is hidden when client or scriptname is too long
|
|
182
|
+
|
|
173
183
|
### 1.8.0 - 3.2.22
|
|
174
184
|
Fixed wrong Script Config for Custom Form Scripts (attribute clients instead of scripts)
|
|
175
185
|
Fixed Scrolling
|
package/docs/scripts.md
CHANGED
|
@@ -137,6 +137,8 @@ Global script params are set by the application and handed over to the script. T
|
|
|
137
137
|
}
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
+
globalScriptParams is not available in Event Manager scripts. Ids are part of requestData there.
|
|
141
|
+
|
|
140
142
|
## requestData
|
|
141
143
|
|
|
142
144
|
This parameter holds the complete request data.
|
package/package.json
CHANGED
package/routes/scriptRoutes.js
CHANGED
|
@@ -13,6 +13,10 @@ const {throwSchemaError} = require('../util/responsehandler');
|
|
|
13
13
|
module.exports = (function() {
|
|
14
14
|
const scriptRoutes = require('express').Router();
|
|
15
15
|
|
|
16
|
+
function decodeScriptName(path) {
|
|
17
|
+
return decodeURI(path).replace(`/`,"")
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
scriptRoutes.get('/',
|
|
17
21
|
isAuthorizedAdmin,
|
|
18
22
|
function (req, res, next) {
|
|
@@ -35,7 +39,7 @@ module.exports = (function() {
|
|
|
35
39
|
});
|
|
36
40
|
|
|
37
41
|
scriptRoutes.get('/:scriptId*', isAuthorizedAdmin, async function (req, res, next) {
|
|
38
|
-
const scriptId = req.path
|
|
42
|
+
const scriptId = decodeScriptName(req.path);
|
|
39
43
|
eventLog.setEventData(
|
|
40
44
|
req,
|
|
41
45
|
CONSTANTS.EVENT_BASE_SCRIPT,
|
|
@@ -75,7 +79,7 @@ module.exports = (function() {
|
|
|
75
79
|
const errors = validationResult(req);
|
|
76
80
|
throwSchemaError(errors);
|
|
77
81
|
|
|
78
|
-
const scriptId = req.path
|
|
82
|
+
const scriptId = decodeScriptName(req.path);
|
|
79
83
|
|
|
80
84
|
eventLog.setEventData(
|
|
81
85
|
req,
|
|
@@ -94,7 +98,7 @@ module.exports = (function() {
|
|
|
94
98
|
});
|
|
95
99
|
|
|
96
100
|
scriptRoutes.delete('/:scriptId*', isAuthorizedAdmin, function (req, res, next) {
|
|
97
|
-
const scriptId = req.path
|
|
101
|
+
const scriptId = decodeScriptName(req.path);
|
|
98
102
|
eventLog.setEventData(
|
|
99
103
|
req,
|
|
100
104
|
CONSTANTS.EVENT_BASE_SCRIPT,
|
package/conf/scripts/p1.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const allowedCats = [
|
|
2
|
-
"Request",
|
|
3
|
-
"Failure"
|
|
4
|
-
];
|
|
5
|
-
|
|
6
|
-
//Validate opsCat1
|
|
7
|
-
if (requestData.opsCat1 && !allowedCats.find(element => element === requestData.opsCat1)) {
|
|
8
|
-
reject(`opsCat1 ${requestData.opsCat1} not in allowed values ${allowedCats}`);
|
|
9
|
-
}
|
|
10
|
-
requestData.summary = `Da kam an: ${requestData.summary}`
|
|
11
|
-
resolve();
|