@xuda.io/account_module 1.2.1468 → 1.2.1470
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 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2163,7 +2163,9 @@ const set_account_profile_picture = async function (uid, account_uid, metadata,
|
|
|
2163
2163
|
const { bio, country, mainCategory, subCategory } = account_info;
|
|
2164
2164
|
|
|
2165
2165
|
const file_ret = await ai_module.get_profile_avatar(account_info.profile_picture, uid, '', account_profile_info, account_info.account_type, 'account', account_uid, { bio, country, mainCategory, subCategory }, business_size, name, account_info.email, job_id, headers);
|
|
2166
|
-
|
|
2166
|
+
if (file_ret.code < 0) {
|
|
2167
|
+
throw new Error(file_ret.data);
|
|
2168
|
+
}
|
|
2167
2169
|
let { code: account_code, data: account_obj3 } = await db_module.get_couch_doc('xuda_accounts', account_uid);
|
|
2168
2170
|
account_obj = account_obj3;
|
|
2169
2171
|
account_info = account_obj.account_info;
|
|
@@ -2174,8 +2176,8 @@ const set_account_profile_picture = async function (uid, account_uid, metadata,
|
|
|
2174
2176
|
const account_save_ret = await db_module.save_couch_doc('xuda_accounts', account_obj);
|
|
2175
2177
|
await update_account_profile_picture_status(account_uid, 3);
|
|
2176
2178
|
}
|
|
2177
|
-
} catch (
|
|
2178
|
-
await update_account_profile_picture_status(account_uid,
|
|
2179
|
+
} catch (err) {
|
|
2180
|
+
await update_account_profile_picture_status(account_uid, 1, err.message);
|
|
2179
2181
|
}
|
|
2180
2182
|
};
|
|
2181
2183
|
|