@xuda.io/account_module 1.2.1502 → 1.2.1504
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 +3 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -3057,7 +3057,7 @@ export const get_picture_cache = async function (uid, docType, name) {
|
|
|
3057
3057
|
let opt = { selector: { docType, name }, limit: 1 };
|
|
3058
3058
|
|
|
3059
3059
|
const ret = await db_module.find_couch_query('xuda_cache', opt);
|
|
3060
|
-
|
|
3060
|
+
|
|
3061
3061
|
if (ret.docs.length) {
|
|
3062
3062
|
return ret.docs[0].file;
|
|
3063
3063
|
}
|
|
@@ -3086,9 +3086,10 @@ export const get_picture_cache = async function (uid, docType, name) {
|
|
|
3086
3086
|
if (name.split(' ').length < 3) return;
|
|
3087
3087
|
let file;
|
|
3088
3088
|
const words_combinations_arr = findAnyThreeWords(name);
|
|
3089
|
+
debugger;
|
|
3089
3090
|
for await (const phrase of words_combinations_arr) {
|
|
3090
3091
|
const words_arr = phrase.split(' ');
|
|
3091
|
-
opt.selector = { docType, $and: [{ name: { $regex: `(?i)\\b${words_arr[0]}
|
|
3092
|
+
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` } }] };
|
|
3092
3093
|
const ret = await db_module.find_couch_query('xuda_cache', opt);
|
|
3093
3094
|
if (ret.docs.length) {
|
|
3094
3095
|
file = ret.docs[0].file;
|