@xuda.io/account_module 1.2.421 → 1.2.423
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
|
@@ -26,6 +26,7 @@ const jobs_module = await import(`${module_path}/jobs_module/index.mjs`);
|
|
|
26
26
|
|
|
27
27
|
export const update_account_info = async function (req, job_id, headers) {
|
|
28
28
|
const marketplace_module = await import(`${module_path}/marketplace_module/index.mjs`);
|
|
29
|
+
const drive_module = await import(`${module_path}/drive_module/index.mjs`);
|
|
29
30
|
|
|
30
31
|
const { uid } = req;
|
|
31
32
|
const data = req;
|
|
@@ -69,6 +70,7 @@ export const update_account_info = async function (req, job_id, headers) {
|
|
|
69
70
|
account_obj.account_info['profile_picture_google'] = val;
|
|
70
71
|
} else {
|
|
71
72
|
const image_name = path.basename(account_obj.account_info['profile_picture']);
|
|
73
|
+
drive_module.delete_drive_files({ uid, drive_type: 'user', files_arr: [image_name] });
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
|
|
@@ -138,7 +140,7 @@ export const update_account_info = async function (req, job_id, headers) {
|
|
|
138
140
|
const ret = await app_module.create_project({ token_ret: req.token_ret, uid, data: { app_name: `Account ${uid} main project`, is_account_project: true, app_plugins_purchased: [' @xuda.io/xuda-dbs-plugin-xuda', '@xuda.io/xuda-framework-plugin-tailwind'] } }, job_id, headers);
|
|
139
141
|
if (ret.code > -1) {
|
|
140
142
|
account_obj.account_project_id = ret.data;
|
|
141
|
-
|
|
143
|
+
|
|
142
144
|
let drive_req = { app_id: account_obj.account_project_id, uid, path: '/' };
|
|
143
145
|
await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Profile Images', is_system: true } }, job_id, headers);
|
|
144
146
|
await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Chat Thumbnails', is_system: true } }, job_id, headers);
|
|
@@ -156,7 +158,7 @@ export const update_account_info = async function (req, job_id, headers) {
|
|
|
156
158
|
}
|
|
157
159
|
|
|
158
160
|
// temp remove later on
|
|
159
|
-
|
|
161
|
+
|
|
160
162
|
let drive_req = { app_id: account_obj.account_project_id, uid, path: '/' };
|
|
161
163
|
await drive_module.create_drive_folder_workspace({ ...drive_req, ...{ folder_name: 'Chat Images', is_system: false } }, job_id, headers);
|
|
162
164
|
await drive_module.create_drive_folder_studio({ ...drive_req, ...{ folder_name: 'Progs Thumbnails', is_system: true } }, job_id, headers);
|