@xuda.io/account_module 1.2.1445 → 1.2.1447
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 -12
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2020,18 +2020,9 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2020
2020
|
// profile_picture = profile_picture_obj.url;
|
|
2021
2021
|
// }
|
|
2022
2022
|
}
|
|
2023
|
-
if (account_type === 'business' && !is_spam) {
|
|
2024
|
-
const business_info = await ai_module.get_business_info(uid, contact_obj.name, contact_obj.email, account_profile_info);
|
|
2025
|
-
const { business_size, business_category, business_sub_category, business_country, business_bio } = business_info;
|
|
2026
|
-
contact_obj.mainCategory = business_category;
|
|
2027
|
-
contact_obj.subCategory = business_sub_category;
|
|
2028
|
-
contact_obj.business_size = business_size;
|
|
2029
|
-
contact_obj.country = business_country;
|
|
2030
|
-
contact_obj.bio = business_bio;
|
|
2031
|
-
}
|
|
2032
2023
|
|
|
2033
2024
|
const d = Date.now();
|
|
2034
|
-
const
|
|
2025
|
+
const contact_obj = {
|
|
2035
2026
|
_id: await _common.xuda_get_uuid('contact'),
|
|
2036
2027
|
email,
|
|
2037
2028
|
name,
|
|
@@ -2055,9 +2046,20 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2055
2046
|
account_profiles: [account_profile_obj._id],
|
|
2056
2047
|
account_type,
|
|
2057
2048
|
};
|
|
2058
|
-
|
|
2049
|
+
|
|
2050
|
+
if (account_type === 'business' && !is_spam) {
|
|
2051
|
+
const business_info = await ai_module.get_business_info(uid, contact_obj.name, contact_obj.email, account_profile_info);
|
|
2052
|
+
const { business_size, business_category, business_sub_category, business_country, business_bio } = business_info;
|
|
2053
|
+
contact_obj.mainCategory = business_category;
|
|
2054
|
+
contact_obj.subCategory = business_sub_category;
|
|
2055
|
+
contact_obj.business_size = business_size;
|
|
2056
|
+
contact_obj.country = business_country;
|
|
2057
|
+
contact_obj.bio = business_bio;
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
const save_ret = await save_contact(uid, contact_obj);
|
|
2059
2061
|
if (!is_spam) {
|
|
2060
|
-
|
|
2062
|
+
set_contact_profile_picture(uid, contact_obj._id, metadata, job_id, headers);
|
|
2061
2063
|
}
|
|
2062
2064
|
// if (!account_info.profile_avatar) {
|
|
2063
2065
|
// const ai_module = await import(`${module_path}/ai_module/index.mjs`);
|