@xuda.io/account_module 1.2.2238 → 1.2.2240
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 +6 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2283,7 +2283,7 @@ export const get_contacts = async function (req, job_id, headers) {
|
|
|
2283
2283
|
|
|
2284
2284
|
if (!account_profile_info.is_main) {
|
|
2285
2285
|
opt.selector.account_profiles = { $in: [account_profile_info.account_profile_id] };
|
|
2286
|
-
}
|
|
2286
|
+
} else {
|
|
2287
2287
|
const active_profiles = await db_module.find_app_couch_query(account_profile_info.app_id, {
|
|
2288
2288
|
selector: {
|
|
2289
2289
|
docType: 'account_profile',
|
|
@@ -2294,6 +2294,10 @@ export const get_contacts = async function (req, job_id, headers) {
|
|
|
2294
2294
|
limit: 9999,
|
|
2295
2295
|
});
|
|
2296
2296
|
|
|
2297
|
+
const active_profile_ids = active_profiles.docs.map((profile) => profile._id).filter(Boolean);
|
|
2298
|
+
opt.selector.account_profiles = { $in: active_profile_ids.length ? active_profile_ids : [account_profile_info.account_profile_id] };
|
|
2299
|
+
}
|
|
2300
|
+
|
|
2297
2301
|
switch (filter_type) {
|
|
2298
2302
|
case 'archived': {
|
|
2299
2303
|
opt.selector.stat = 5;
|
|
@@ -3147,6 +3151,7 @@ export const delete_account_profile = async function (req, job_id, headers) {
|
|
|
3147
3151
|
|
|
3148
3152
|
export const unarchive_account_profile = async function (req) {
|
|
3149
3153
|
const { profile_id, uid } = req;
|
|
3154
|
+
debugger;
|
|
3150
3155
|
try {
|
|
3151
3156
|
const app_id = await get_account_default_project_id(uid);
|
|
3152
3157
|
|