@manyos/smileconnect-api 1.55.3 → 1.55.4

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 CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## API
4
4
 
5
+ ### 1.55.4 - 02.03.22
6
+ Fix error when scripts with space in name are deleted
7
+
5
8
  ### 1.55.3 - 01.03.22
6
9
  Ensure TTL of 0 disables cache for Remedy Adapter
7
10
 
@@ -170,6 +173,10 @@ The eventmanager will check all outbound webhooks for an event. If one fails, th
170
173
 
171
174
  ## GUI
172
175
 
176
+ ### 1.8.2 - 3.3.22
177
+ Fixed: delete webhooks for client if client is deleted
178
+ Fixed: delete button / menu is hidden if client or scriptname is to long
179
+
173
180
  ### 1.8.0 - 3.2.22
174
181
  Fixed wrong Script Config for Custom Form Scripts (attribute clients instead of scripts)
175
182
  Fixed Scrolling
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manyos/smileconnect-api",
3
- "version": "1.55.3",
3
+ "version": "1.55.4",
4
4
  "description": "A proxy and abstraction layer for BMCs IT Service Management Suite",
5
5
  "main": "app.js",
6
6
  "scripts": {
@@ -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.replace(`/`,"");
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.replace(`/`,"");
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.replace(`/`,"");
101
+ const scriptId = decodeScriptName(req.path);
98
102
  eventLog.setEventData(
99
103
  req,
100
104
  CONSTANTS.EVENT_BASE_SCRIPT,
@@ -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();