@xuda.io/account_module 1.2.2255 → 1.2.2256
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 +15 -16
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -3238,11 +3238,11 @@ export const get_account_profiles = async function (req) {
|
|
|
3238
3238
|
let profile_docs = { docs: [], total_docs: profiles.total_docs };
|
|
3239
3239
|
for await (let doc of profiles.docs) {
|
|
3240
3240
|
doc = await get_account_profile_info(uid, doc);
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3241
|
+
if (doc.main) {
|
|
3242
|
+
profile_docs.docs.unshift(doc);
|
|
3243
|
+
} else {
|
|
3244
|
+
profile_docs.docs.push(doc);
|
|
3245
|
+
}
|
|
3246
3246
|
}
|
|
3247
3247
|
|
|
3248
3248
|
if (!profile_id) {
|
|
@@ -3253,17 +3253,16 @@ export const get_account_profiles = async function (req) {
|
|
|
3253
3253
|
}
|
|
3254
3254
|
}
|
|
3255
3255
|
|
|
3256
|
-
if (filter_type === 'all' && !profile_id && !search && active_tab && profile_docs.docs[0].main) {
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
}
|
|
3256
|
+
// if (filter_type === 'all' && !profile_id && !search && active_tab && profile_docs.docs.length === 1 && profile_docs.docs[0].main) {
|
|
3257
|
+
// // return empty state if no custom profile defined by user
|
|
3258
|
+
// return {
|
|
3259
|
+
// code: 1,
|
|
3260
|
+
// data: {
|
|
3261
|
+
// docs: [],
|
|
3262
|
+
// total_docs: 0,
|
|
3263
|
+
// },
|
|
3264
|
+
// };
|
|
3265
|
+
// }
|
|
3267
3266
|
|
|
3268
3267
|
return {
|
|
3269
3268
|
code: 1,
|