@machhub-dev/node-red-nodes 1.0.6 → 1.0.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.
|
@@ -112,12 +112,14 @@ class HTTPAPIService {
|
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
// Collection Example
|
|
115
|
-
static getCollectionsExample(settings, collectionID) {
|
|
115
|
+
static getCollectionsExample(settings, collectionID, isSelectQuery) {
|
|
116
116
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117
117
|
try {
|
|
118
118
|
const res = yield this.service(settings).request
|
|
119
119
|
.post('collections/example', undefined, {
|
|
120
|
-
collectionID
|
|
120
|
+
collectionID,
|
|
121
|
+
// @ts-ignore: need to pass as boolean not string
|
|
122
|
+
isSelectQuery: isSelectQuery
|
|
121
123
|
});
|
|
122
124
|
return res;
|
|
123
125
|
}
|
|
@@ -208,7 +208,7 @@ function default_1(RED) {
|
|
|
208
208
|
// HTTP endpoint to fetch collection example for admin UI
|
|
209
209
|
RED.httpAdmin.post("/collections/example", (req, res) => __awaiter(this, void 0, void 0, function* () {
|
|
210
210
|
try {
|
|
211
|
-
const { collectionID, host, httpPort, clientId, clientSecret } = req.body;
|
|
211
|
+
const { collectionID, isSelectQuery, host, httpPort, clientId, clientSecret } = req.body;
|
|
212
212
|
let configData;
|
|
213
213
|
// Check if credentials are provided (config node)
|
|
214
214
|
if (clientId && clientSecret) {
|
|
@@ -229,7 +229,7 @@ function default_1(RED) {
|
|
|
229
229
|
clientSecret: envConfig.clientSecret
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
|
-
const result = yield http_api_services_1.HTTPAPIService.getCollectionsExample(configData, collectionID);
|
|
232
|
+
const result = yield http_api_services_1.HTTPAPIService.getCollectionsExample(configData, collectionID, isSelectQuery);
|
|
233
233
|
res.json(result);
|
|
234
234
|
}
|
|
235
235
|
catch (e) {
|