@xuda.io/account_module 1.2.422 → 1.2.424
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
|
@@ -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;
|
|
@@ -139,7 +140,7 @@ export const update_account_info = async function (req, job_id, headers) {
|
|
|
139
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);
|
|
140
141
|
if (ret.code > -1) {
|
|
141
142
|
account_obj.account_project_id = ret.data;
|
|
142
|
-
|
|
143
|
+
|
|
143
144
|
let drive_req = { app_id: account_obj.account_project_id, uid, path: '/' };
|
|
144
145
|
await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Profile Images', is_system: true } }, job_id, headers);
|
|
145
146
|
await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Chat Thumbnails', is_system: true } }, job_id, headers);
|
|
@@ -157,7 +158,7 @@ export const update_account_info = async function (req, job_id, headers) {
|
|
|
157
158
|
}
|
|
158
159
|
|
|
159
160
|
// temp remove later on
|
|
160
|
-
|
|
161
|
+
|
|
161
162
|
let drive_req = { app_id: account_obj.account_project_id, uid, path: '/' };
|
|
162
163
|
await drive_module.create_drive_folder_workspace({ ...drive_req, ...{ folder_name: 'Chat Images', is_system: false } }, job_id, headers);
|
|
163
164
|
await drive_module.create_drive_folder_studio({ ...drive_req, ...{ folder_name: 'Progs Thumbnails', is_system: true } }, job_id, headers);
|
|
@@ -224,7 +225,6 @@ export const increment_account_usage = async function (req) {
|
|
|
224
225
|
opt.key = uid;
|
|
225
226
|
}
|
|
226
227
|
const accounts_ret = await db_module.get_couch_view_raw('xuda_accounts', 'all_accounts', opt);
|
|
227
|
-
|
|
228
228
|
const drive_module = await import(`${module_path}/drive_module/index.mjs`);
|
|
229
229
|
|
|
230
230
|
function bytesToGB(bytes) {
|