@xuda.io/ai_module 1.1.4418 → 1.1.4419
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 +4 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -5667,7 +5667,7 @@ const create_and_upload_image_to_drive = async function (drive_type, file_path,
|
|
|
5667
5667
|
};
|
|
5668
5668
|
|
|
5669
5669
|
export const create_avatar = async function (req, job_id, headers) {
|
|
5670
|
-
const { docType, uid, url, _id, name, account_type } = req;
|
|
5670
|
+
const { docType, uid, url, _id, name, account_type, metadata } = req;
|
|
5671
5671
|
try {
|
|
5672
5672
|
if (!['account', 'account_profile'].includes(docType)) {
|
|
5673
5673
|
throw new Error('invalid docType value');
|
|
@@ -5685,7 +5685,9 @@ export const create_avatar = async function (req, job_id, headers) {
|
|
|
5685
5685
|
|
|
5686
5686
|
const account_obj = await db_module.get_couch_doc_native('xuda_accounts', uid);
|
|
5687
5687
|
const account_info = account_obj.account_info;
|
|
5688
|
-
|
|
5688
|
+
if (!metadata) {
|
|
5689
|
+
metadata = account_info;
|
|
5690
|
+
}
|
|
5689
5691
|
|
|
5690
5692
|
return await get_profile_avatar(url, uid, null, account_profile_info, account_type, docType, _id, metadata, account_info, name, account_info.email, job_id, headers);
|
|
5691
5693
|
} catch (err) {
|