corebasic 1.0.100 → 1.0.102
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/libs/features.js +4 -4
- package/package.json +1 -1
package/libs/features.js
CHANGED
|
@@ -118,10 +118,10 @@ export const start = async (app, url, file) => {
|
|
|
118
118
|
let feature = getFeature(req.body.feature)
|
|
119
119
|
let topic = feature.topic
|
|
120
120
|
try {
|
|
121
|
-
let params = getFeatureUrl(feature.api).split("/").filter(item => item.startsWith(":"))
|
|
121
|
+
let params = getFeatureUrl(feature.api).split("/").filter(item => item.startsWith(":")).map(item => item.replace(":", ""))
|
|
122
122
|
for (let param of params)
|
|
123
123
|
if (!req.params[param])
|
|
124
|
-
throw { status: 404, message: "Resource not found. One or more url parameter not specified.
|
|
124
|
+
throw { status: 404, message: "Resource not found. One or more url parameter not specified." }
|
|
125
125
|
|
|
126
126
|
|
|
127
127
|
if (method === "get") {
|
|
@@ -202,9 +202,9 @@ export const start = async (app, url, file) => {
|
|
|
202
202
|
function prepareMessage(req) {
|
|
203
203
|
let txn = req.body.txn ?? Utils.uid()
|
|
204
204
|
let _id = req.body.data._id ?? txn
|
|
205
|
-
let {data, feature, app, user, client, version} = req.body
|
|
205
|
+
let {data, feature, app, user, outlet, company, client, version} = req.body
|
|
206
206
|
let params = req.params
|
|
207
|
-
return { data, params, feature, app, user, client, version, txn, id: _id, date: new Date().getTime() }
|
|
207
|
+
return { data, params, feature, app, user, outlet, company, client, version, txn, id: _id, date: new Date().getTime() }
|
|
208
208
|
}
|
|
209
209
|
const commandAction = async (req, res, topic) => {
|
|
210
210
|
let message = prepareMessage(req)
|