@ejfdelgado/ejflab-back 1.16.2 → 1.16.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/package.json +1 -1
- package/srv/MilvusSrv.mjs +5 -1
package/package.json
CHANGED
package/srv/MilvusSrv.mjs
CHANGED
@@ -168,9 +168,13 @@ export class MilvusSrv {
|
|
168
168
|
data
|
169
169
|
} = decoded;
|
170
170
|
await MilvusSrv.useDatabase(client, db_name, false);
|
171
|
+
let dataArray = data;
|
172
|
+
if (!(dataArray instanceof Array)) {
|
173
|
+
dataArray = [dataArray];
|
174
|
+
}
|
171
175
|
await client.insert({
|
172
176
|
collection_name: collection_name,
|
173
|
-
data:
|
177
|
+
data: dataArray
|
174
178
|
});
|
175
179
|
console.log("Milvus insert... OK");
|
176
180
|
} catch (err) {
|