@xuda.io/account_module 1.2.1496 → 1.2.1498

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 +8 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3083,10 +3083,16 @@ export const get_picture_cache = async function (uid, docType, name) {
3083
3083
  return result.map((arr) => arr.join(' '));
3084
3084
  }
3085
3085
  if (name.split(' ').length < 3) return;
3086
-
3086
+ let file;
3087
3087
  const words_combinations_arr = findAnyThreeWords(name);
3088
3088
  for await (const phrase of words_combinations_arr) {
3089
3089
  const words_arr = phrase.split(' ');
3090
- opt.selector = { docType, $and: [{ name: { $regex: '(?i)\\bfive\\b' } }, { name: { $regex: '(?i)\\bword\\b' } }, { name: { $regex: '(?i)\\btitle\\b' } }] };
3090
+ opt.selector = { docType, $and: [{ name: { $regex: `(?i)\\b${words_arr[0]}}\\b` } }, { name: { $regex: `(?i)\\b${words_arr[1]}\\b` } }, { name: { $regex: `(?i)\\b${words_arr[2]}\\b` } }] };
3091
+ const ret = await db_module.find_couch_query('xuda_cache', opt);
3092
+ if (ret.doc.length) {
3093
+ file = ret.doc[0].file;
3094
+ break;
3095
+ }
3091
3096
  }
3097
+ return file;
3092
3098
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1496",
3
+ "version": "1.2.1498",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {