@xuda.io/account_module 1.2.1497 → 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.
- package/index.mjs +7 -1
- 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
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
|
};
|