@xuda.io/ai_module 1.1.4393 → 1.1.4395
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 +8 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -5663,6 +5663,14 @@ const create_and_upload_image_to_drive = async function (drive_type, file_path,
|
|
|
5663
5663
|
export const create_avatar = async function (req, job_id, headers) {
|
|
5664
5664
|
const { docType, uid, url, _id, name, account_type } = req;
|
|
5665
5665
|
try {
|
|
5666
|
+
if (!['account', 'account_profile'].includes(docType)) {
|
|
5667
|
+
throw new Error('invalid docType value');
|
|
5668
|
+
}
|
|
5669
|
+
|
|
5670
|
+
if (!url) {
|
|
5671
|
+
throw new Error('invalid url');
|
|
5672
|
+
}
|
|
5673
|
+
|
|
5666
5674
|
const account_profile_info = await get_active_account_profile_info(uid);
|
|
5667
5675
|
|
|
5668
5676
|
const account_obj = await db_module.get_couch_doc_native('xuda_accounts', uid);
|