@xuda.io/account_module 1.2.1694 → 1.2.1696
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 +14 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2804,9 +2804,9 @@ export const get_account_profiles = async function (req) {
|
|
|
2804
2804
|
break;
|
|
2805
2805
|
}
|
|
2806
2806
|
|
|
2807
|
-
if (_id) {
|
|
2808
|
-
|
|
2809
|
-
}
|
|
2807
|
+
// if (_id) {
|
|
2808
|
+
// opt.selector._id = _id;
|
|
2809
|
+
// }
|
|
2810
2810
|
|
|
2811
2811
|
if (profile_id) {
|
|
2812
2812
|
opt.selector._id = profile_id;
|
|
@@ -2872,6 +2872,17 @@ export const get_account_profiles = async function (req) {
|
|
|
2872
2872
|
}
|
|
2873
2873
|
}
|
|
2874
2874
|
|
|
2875
|
+
if (!filter_type && !profile_id && !search && profile_docs.docs.length === 1 && profile_docs.docs[0].main) {
|
|
2876
|
+
// return empty state if no custom profile defined by user
|
|
2877
|
+
return {
|
|
2878
|
+
code: 1,
|
|
2879
|
+
data: {
|
|
2880
|
+
docs: [],
|
|
2881
|
+
total_docs: 0,
|
|
2882
|
+
},
|
|
2883
|
+
};
|
|
2884
|
+
}
|
|
2885
|
+
|
|
2875
2886
|
return {
|
|
2876
2887
|
code: 1,
|
|
2877
2888
|
data: {
|