@xuda.io/ai_module 1.1.3915 → 1.1.3917

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/index.mjs +2 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1885,7 +1885,7 @@ export const get_ai_chats = async function (req, job_id, headers) {
1885
1885
  // const ai_chats = await db_module.get_app_couch_view(app_id, 'ai_chat_list', {
1886
1886
  // key: reference_id || '',
1887
1887
  // });
1888
- let ai_chats = { docs: [] };
1888
+ let ai_chats = { docs: [], total_docs: 0 };
1889
1889
  debugger;
1890
1890
  if (filter_type !== 'pending') {
1891
1891
  ai_chats = await db_module.find_app_couch_query(app_id, opt);
@@ -1934,7 +1934,7 @@ export const get_ai_chats = async function (req, job_id, headers) {
1934
1934
  docs.push(doc);
1935
1935
  }
1936
1936
 
1937
- return { code: 2, data: { docs: [...requests_from.docs, ...docs], total_docs: ai_chats } };
1937
+ return { code: 2, data: { docs: [...requests_from.docs, ...docs], total_docs: ai_chats.total_docs } };
1938
1938
  } catch (err) {
1939
1939
  return { code: -2, data: err.message };
1940
1940
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3915",
3
+ "version": "1.1.3917",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",