@xuda.io/ai_module 1.1.4365 → 1.1.4366

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.
Files changed (2) hide show
  1. package/index.mjs +2 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -5679,7 +5679,7 @@ export const create_profile_avatar = async function (req, job_id, headers) {
5679
5679
  const uniqueId = Date.now() + '_' + Math.random().toString(36).substring(7);
5680
5680
  const tempOutputPath = path.join(tempDir, `output_${uniqueId}.png`);
5681
5681
 
5682
- const { url, uid, account_obj, prompt, account_profile_info, account_type, docType = 'account', _id, metadata = {}, profile_picture, business_size = 'unknown', name } = req;
5682
+ const { url, uid, prompt, account_profile_info, account_type, docType = 'account', _id, metadata = {}, profile_picture, business_size = 'unknown', name, email } = req;
5683
5683
 
5684
5684
  // async function normalizeBase64To1024(base64Image) {
5685
5685
  // const inputBuffer = Buffer.from(base64Image, 'base64');
@@ -5996,7 +5996,7 @@ export const create_profile_avatar = async function (req, job_id, headers) {
5996
5996
  console.log('Success! Saved →', outputPath);
5997
5997
 
5998
5998
  const ext = 'png';
5999
- const originalname = `avatar_${account_obj?.account_info?.email || account_obj._id}.${ext}`;
5999
+ const originalname = `avatar_${email || _id}.${ext}`;
6000
6000
 
6001
6001
  const file_obj = {
6002
6002
  originalname,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4365",
3
+ "version": "1.1.4366",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",