@xuda.io/account_module 1.2.2042 → 1.2.2044

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 +3 -31
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -49,6 +49,7 @@ 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
51
  const stripe_ms = await import(`${module_path}/stripe_module/index_ms.mjs`);
52
+ const logs_ms = await import(`${module_path}/logs_module/index_ms.mjs`);
52
53
 
53
54
  export const update_account_info = async function (req, job_id, headers) {
54
55
  const { uid } = req;
@@ -157,10 +158,6 @@ export const update_account_info = async function (req, job_id, headers) {
157
158
 
158
159
  account_obj.account_info.full_name = `${account_obj.account_info.first_name} ${account_obj.account_info.last_name}`;
159
160
 
160
- // if (account_info_changes_arr.includes('profile_picture') || account_info_changes_arr.includes('profile_avatar_stat')) {
161
- // account_obj.account_info['profile_avatar'] = '';
162
- // }
163
-
164
161
  //clean up received from req
165
162
  delete account_obj.account_info.gtp_token;
166
163
  delete account_obj.account_info.client_id;
@@ -169,30 +166,6 @@ export const update_account_info = async function (req, job_id, headers) {
169
166
  delete account_obj.account_info.job_id;
170
167
  delete account_obj.account_info.app_id;
171
168
 
172
- // if (!account_obj.account_project_id) {
173
- // const app_module = await import(`${module_path}/app_module/index.mjs`);
174
-
175
- // 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);
176
- // if (ret.code > -1) {
177
- // account_obj.account_project_id = ret.data;
178
-
179
- // let drive_req = { app_id: account_obj.account_project_id, uid, path: '/' };
180
- // await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Profile Images', is_system: true } }, job_id, headers);
181
- // await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Chat Thumbnails', is_system: true } }, job_id, headers);
182
- // await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Chat Attachments', is_system: true } }, job_id, headers);
183
- // }
184
- // }
185
-
186
- // temp remove later on
187
-
188
- // let drive_req = { app_id: account_obj.account_project_id, uid, path: '/' };
189
- // await drive_module.create_drive_folder_workspace({ ...drive_req, ...{ folder_name: 'Chat Images' } }, job_id, headers);
190
- // await drive_module.create_drive_folder_studio({ ...drive_req, ...{ folder_name: 'Progs Thumbnails', is_system: true } }, job_id, headers);
191
- // await drive_module.create_drive_folder_studio({ ...drive_req, ...{ folder_name: 'Screenshots', is_system: true } }, job_id, headers);
192
- // await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Profile Images', is_system: true } }, job_id, headers);
193
- // await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Chat Thumbnails', is_system: true } }, job_id, headers);
194
- // await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Chat Attachments', is_system: true } }, job_id, headers);
195
-
196
169
  const save_ret = await db_module.save_couch_doc('xuda_accounts', account_obj);
197
170
 
198
171
  if (account_obj.account_info?.profile_picture) {
@@ -812,9 +785,8 @@ export const add_account_log_util = async function (body, status, service, sourc
812
785
  if (!security) {
813
786
  if (service.substr(0, 4) === 'get_' && !body.api_pk && !body.api_sk) return;
814
787
  }
815
- // }
816
- const logs_module = await import(`${module_path}/logs_module/index.mjs`);
817
- logs_module.add_account_log(get_account_log_object(body, status, service, source, response_data, ip, headers, security));
788
+
789
+ logs_ms.add_account_log(get_account_log_object(body, status, service, source, response_data, ip, headers, security));
818
790
  };
819
791
 
820
792
  export const save_ssh_key = async function (req) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.2042",
3
+ "version": "1.2.2044",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {