@xuda.io/xuda-dbs-plugin-xuda 1.0.65 → 1.0.67

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +16 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-dbs-plugin-xuda",
3
- "version": "1.0.65",
3
+ "version": "1.0.67",
4
4
  "description": "Xuda Database Socket for Xuda's proprietary structure powered by CouchDB",
5
5
  "scripts": {
6
6
  "pub": "npm version patch --force && npm publish --access public"
package/server.js CHANGED
@@ -853,7 +853,22 @@ const query_db = async function (e, db, app_id_reference, table_obj) {
853
853
 
854
854
  var obj = {};
855
855
  for await (const [arr_key, arr_val] of Object.entries(arr)) {
856
- obj[table_index.data.keys[arr_key]] = arr_val;
856
+ let field_id = table_index.data.keys[arr_key];
857
+
858
+ const _tableFieldsObj = find_item_by_key(
859
+ table_obj.tableFields,
860
+ "field_id",
861
+ field_id
862
+ );
863
+
864
+ let field_value = await get_cast_val(
865
+ "dbs_update",
866
+ e.field_id,
867
+ _tableFieldsObj.props.fieldType,
868
+ arr_val
869
+ );
870
+
871
+ obj[field_id] = field_value;
857
872
  }
858
873
  obj["REDUCE_VALUE"] = val.value;
859
874