@xuda.io/ai_module 1.1.5043 → 1.1.5045

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 +3 -24
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1322,36 +1322,15 @@ export const get_ai_chats = async function (req, job_id, headers) {
1322
1322
 
1323
1323
  //====================
1324
1324
 
1325
- let stat_type = 'all';
1326
-
1327
- switch (filter_type) {
1328
- case 'archived': {
1329
- stat_type = filter_type;
1330
- break;
1331
- }
1332
- case 'shared': {
1333
- stat_type = filter_type;
1334
- break;
1335
- }
1336
-
1337
- // case 'mine': {
1338
- // opt.selector.uid = uid;
1339
-
1340
- // break;
1341
- // }
1342
-
1343
- default:
1344
- // opt.selector.team_req_stat = { $eq: 3 };
1345
- break;
1346
- }
1325
+ let stat_type = filter_type === 'archived' ? 'archived' : 'all';
1347
1326
 
1348
1327
  const profile_id = account_profile_info.is_main ? 'all' : account_profile_info.account_profile_id;
1349
1328
  const conv_type = conversation_type ? conversation_type : 'all';
1350
1329
  const mine_uid = filter_type === 'mine' ? uid : 'all';
1351
1330
 
1352
1331
  const ret = await db_module.get_app_couch_view(account_profile_info.app_id, 'by_profile', {
1353
- startkey: [profile_id, stat_type, conv_type, reference_id, mine_uid, 0],
1354
- endkey: [profile_id, stat_type, conv_type, reference_id, mine_uid, 9999999999999],
1332
+ startkey: [stat_type, reference_id, 0],
1333
+ endkey: [reference_id, 9999999999999],
1355
1334
  limit: parseInt(limit) || 9999,
1356
1335
  skip: parseInt(skip) || 0,
1357
1336
  include_docs: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5043",
3
+ "version": "1.1.5045",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",