@xuda.io/account_module 1.2.2041 → 1.2.2043

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 -31
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -48,6 +48,7 @@ const jobs_ms = await import(`${module_path}/jobs_module/index_ms.mjs`);
48
48
  const team_ms = await import(`${module_path}/team_module/index_ms.mjs`);
49
49
  const email_ms = await import(`${module_path}/email_module/index_ms.mjs`);
50
50
  const marketplace_ms = await import(`${module_path}/marketplace_module/index_ms.mjs`);
51
+ const stripe_ms = await import(`${module_path}/stripe_module/index_ms.mjs`);
51
52
 
52
53
  export const update_account_info = async function (req, job_id, headers) {
53
54
  const { uid } = req;
@@ -156,10 +157,6 @@ export const update_account_info = async function (req, job_id, headers) {
156
157
 
157
158
  account_obj.account_info.full_name = `${account_obj.account_info.first_name} ${account_obj.account_info.last_name}`;
158
159
 
159
- // if (account_info_changes_arr.includes('profile_picture') || account_info_changes_arr.includes('profile_avatar_stat')) {
160
- // account_obj.account_info['profile_avatar'] = '';
161
- // }
162
-
163
160
  //clean up received from req
164
161
  delete account_obj.account_info.gtp_token;
165
162
  delete account_obj.account_info.client_id;
@@ -168,30 +165,6 @@ export const update_account_info = async function (req, job_id, headers) {
168
165
  delete account_obj.account_info.job_id;
169
166
  delete account_obj.account_info.app_id;
170
167
 
171
- // if (!account_obj.account_project_id) {
172
- // const app_module = await import(`${module_path}/app_module/index.mjs`);
173
-
174
- // 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);
175
- // if (ret.code > -1) {
176
- // account_obj.account_project_id = ret.data;
177
-
178
- // let drive_req = { app_id: account_obj.account_project_id, uid, path: '/' };
179
- // await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Profile Images', is_system: true } }, job_id, headers);
180
- // await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Chat Thumbnails', is_system: true } }, job_id, headers);
181
- // await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Chat Attachments', is_system: true } }, job_id, headers);
182
- // }
183
- // }
184
-
185
- // temp remove later on
186
-
187
- // let drive_req = { app_id: account_obj.account_project_id, uid, path: '/' };
188
- // await drive_module.create_drive_folder_workspace({ ...drive_req, ...{ folder_name: 'Chat Images' } }, job_id, headers);
189
- // await drive_module.create_drive_folder_studio({ ...drive_req, ...{ folder_name: 'Progs Thumbnails', is_system: true } }, job_id, headers);
190
- // await drive_module.create_drive_folder_studio({ ...drive_req, ...{ folder_name: 'Screenshots', is_system: true } }, job_id, headers);
191
- // await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Profile Images', is_system: true } }, job_id, headers);
192
- // await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Chat Thumbnails', is_system: true } }, job_id, headers);
193
- // await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Chat Attachments', is_system: true } }, job_id, headers);
194
-
195
168
  const save_ret = await db_module.save_couch_doc('xuda_accounts', account_obj);
196
169
 
197
170
  if (account_obj.account_info?.profile_picture) {
@@ -1573,9 +1546,7 @@ export const get_account_rt_info = async function (uid) {
1573
1546
  };
1574
1547
 
1575
1548
  export const validate_account_topup = async function (uid, items = []) {
1576
- const stripe_module = await import(`${module_path}/stripe_module/index.mjs`);
1577
-
1578
- const { code, data } = await stripe_module.get_billing_metrics({ uid });
1549
+ const { code, data } = await stripe_ms.get_billing_metrics({ uid });
1579
1550
  if (code < 0) {
1580
1551
  throw new Error(data);
1581
1552
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.2041",
3
+ "version": "1.2.2043",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {