@xuda.io/account_module 1.2.1399 → 1.2.1400
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 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2075,6 +2075,7 @@ const set_account_profile_picture = async function (uid, contact_uid) {
|
|
|
2075
2075
|
if (account_code < 0) {
|
|
2076
2076
|
throw new Error(`account ${contact_uid} not found`);
|
|
2077
2077
|
}
|
|
2078
|
+
await update_profile_avatar_status(contact_uid, 2);
|
|
2078
2079
|
if (!account_info.profile_picture) {
|
|
2079
2080
|
const file_ret = await ai_module.get_profile_picture(uid, account_type, name, { email, context, metadata, account_info }, account_profile_info, job_id, headers);
|
|
2080
2081
|
|
|
@@ -2135,8 +2136,11 @@ const set_account_profile_picture = async function (uid, contact_uid) {
|
|
|
2135
2136
|
account_info.profile_avatar = account_info.profile_avatar_obj.file_url;
|
|
2136
2137
|
|
|
2137
2138
|
const account_save_ret = await db_module.save_couch_doc('xuda_accounts', account_obj);
|
|
2139
|
+
await update_profile_avatar_status(contact_uid, 3);
|
|
2138
2140
|
}
|
|
2139
|
-
} catch (error) {
|
|
2141
|
+
} catch (error) {
|
|
2142
|
+
await update_profile_avatar_status(contact_uid, 1);
|
|
2143
|
+
}
|
|
2140
2144
|
};
|
|
2141
2145
|
|
|
2142
2146
|
export const get_contacts = async function (req) {
|