@manyos/smileconnect-api 1.71.6 → 1.71.7
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 +4 -0
- package/package.json +1 -1
- package/routes/taskRoutes.js +14 -6
- package/routes/ticketWorkLogRoutes.js +6 -2
package/docs/releases.md
CHANGED
package/package.json
CHANGED
package/routes/taskRoutes.js
CHANGED
|
@@ -112,8 +112,12 @@ module.exports = (function () {
|
|
|
112
112
|
);
|
|
113
113
|
|
|
114
114
|
const result = await task.getTaskByRootRequest(req.user.config, parentId, taskId, req.globalScriptParams, includeString);
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
if (result.data) {
|
|
116
|
+
req.includeObjectsList = result.included;
|
|
117
|
+
req.result = {data:result.data || {}};
|
|
118
|
+
} else {
|
|
119
|
+
req.responseStatus = 404;
|
|
120
|
+
}
|
|
117
121
|
next();
|
|
118
122
|
});
|
|
119
123
|
|
|
@@ -260,9 +264,13 @@ module.exports = (function () {
|
|
|
260
264
|
"self" : `/v1/${req.parentType}/${req.parentId}/tasks/${taskId}/worklogs/${worklogId}`
|
|
261
265
|
};
|
|
262
266
|
log.debug('res', urls);
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
267
|
+
if (result.data) {
|
|
268
|
+
req.includeObjectsList = result.included;
|
|
269
|
+
req.result = {data: result.data || {}};
|
|
270
|
+
req.result.urls = urls;
|
|
271
|
+
} else {
|
|
272
|
+
req.responseStatus = 404;
|
|
273
|
+
}
|
|
266
274
|
next();
|
|
267
275
|
});
|
|
268
276
|
|
|
@@ -346,4 +354,4 @@ module.exports = (function () {
|
|
|
346
354
|
});
|
|
347
355
|
|
|
348
356
|
return taskRoutes;
|
|
349
|
-
})();
|
|
357
|
+
})();
|
|
@@ -68,7 +68,11 @@ module.exports = (function() {
|
|
|
68
68
|
worklogId
|
|
69
69
|
);
|
|
70
70
|
ticketWorkLogController.getWorklog(req.ticketConfig, req.user.config, ticketId, worklogId, undefined, req.globalScriptParams).then(function (result) {
|
|
71
|
-
|
|
71
|
+
if (!result.data) {
|
|
72
|
+
req.responseStatus = 404;
|
|
73
|
+
} else {
|
|
74
|
+
req.result = result;
|
|
75
|
+
}
|
|
72
76
|
next();
|
|
73
77
|
}).catch(function (reason) {
|
|
74
78
|
next(reason);
|
|
@@ -210,4 +214,4 @@ module.exports = (function() {
|
|
|
210
214
|
});
|
|
211
215
|
|
|
212
216
|
return ticketWorkLogRoutes;
|
|
213
|
-
})();
|
|
217
|
+
})();
|