@xuda.io/account_module 1.2.1353 → 1.2.1355
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 +5 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -45,7 +45,7 @@ const _utils = await import(path.join(process.env.XUDA_HOME, 'common', 'xuda-cpi
|
|
|
45
45
|
// Module Paths
|
|
46
46
|
const module_path = path.join(process.env.XUDA_HOME, 'cpi') + (!_conf.is_debug ? '/node_modules/@xuda.io' : '');
|
|
47
47
|
const db_module = await import(`${module_path}/db_module/index.mjs`);
|
|
48
|
-
|
|
48
|
+
const ai_module = await import(`${module_path}/ai_module/index.mjs`);
|
|
49
49
|
|
|
50
50
|
export const update_account_info = async function (req, job_id, headers) {
|
|
51
51
|
const marketplace_module = await import(`${module_path}/marketplace_module/index.mjs`);
|
|
@@ -1968,7 +1968,8 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
1968
1968
|
};
|
|
1969
1969
|
const user_contacts = await find_contact_query(uid, opt);
|
|
1970
1970
|
if (user_contacts.docs.length) {
|
|
1971
|
-
throw new Error('contact already exist');
|
|
1971
|
+
// throw new Error('contact already exist');
|
|
1972
|
+
return { code: -1, data: 'contact already exist', contact_id: user_contacts.docs[0]._id };
|
|
1972
1973
|
}
|
|
1973
1974
|
|
|
1974
1975
|
/////////////////
|
|
@@ -2023,7 +2024,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2023
2024
|
profile_avatar_obj,
|
|
2024
2025
|
account_profiles: [account_profile_obj._id],
|
|
2025
2026
|
};
|
|
2026
|
-
const
|
|
2027
|
+
const save_ret = await save_contact(uid, doc);
|
|
2027
2028
|
|
|
2028
2029
|
if (!account_info_ret?.data?.profile_avatar) {
|
|
2029
2030
|
const app_id = await get_account_default_project_id(uid);
|
|
@@ -2040,7 +2041,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2040
2041
|
}
|
|
2041
2042
|
}
|
|
2042
2043
|
}
|
|
2043
|
-
return
|
|
2044
|
+
return save_ret;
|
|
2044
2045
|
} catch (err) {
|
|
2045
2046
|
return { code: -1, data: err.message };
|
|
2046
2047
|
}
|