@xuda.io/ai_module 1.1.4077 → 1.1.4078
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 +3 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -5609,8 +5609,8 @@ export const create_profile_avatar = async function (req, job_id, headers) {
|
|
|
5609
5609
|
};
|
|
5610
5610
|
|
|
5611
5611
|
// const drive_module = await import(`${module_path}/drive_module/index.mjs`);
|
|
5612
|
-
const { url, uid, account_obj, prompt,
|
|
5613
|
-
if (!
|
|
5612
|
+
const { url, uid, account_obj, prompt, is_profile_avatar } = req;
|
|
5613
|
+
if (!is_profile_avatar) {
|
|
5614
5614
|
await update_profile_avatar_status(account_obj._id, 2);
|
|
5615
5615
|
}
|
|
5616
5616
|
try {
|
|
@@ -5812,7 +5812,7 @@ export const create_profile_avatar = async function (req, job_id, headers) {
|
|
|
5812
5812
|
const drive_ret = await drive_module.upload_drive_file_user({ uid, path: '/Profile Images' }, job_id, headers, file_obj);
|
|
5813
5813
|
|
|
5814
5814
|
if (drive_ret.code > 0) {
|
|
5815
|
-
if (!
|
|
5815
|
+
if (!is_profile_avatar) {
|
|
5816
5816
|
let db_doc = await db_module.get_couch_doc_native('xuda_accounts', account_obj._id);
|
|
5817
5817
|
db_doc.account_info.profile_avatar = drive_ret.data.file_url;
|
|
5818
5818
|
db_doc.account_info.profile_avatar_obj == drive_ret.data;
|