@xuda.io/account_module 1.2.1298 → 1.2.1300

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 +4 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2856,8 +2856,9 @@ export const delete_account_profile = async function (req, job_id, headers) {
2856
2856
  export const unarchive_account_profile = async function (req) {
2857
2857
  const { profile_id } = req;
2858
2858
  try {
2859
+ const app_id = await get_account_default_project_id(uid);
2859
2860
  const team_module = await import(`${module_path}/team_module/index.mjs`);
2860
- var account_profile_doc = await db_module.get_couch_doc_native('xuda_accounts', profile_id);
2861
+ var account_profile_doc = await db_module.get_app_couch_doc_native(app_id, profile_id);
2861
2862
 
2862
2863
  if (account_profile_doc.stat !== 5) {
2863
2864
  throw new Error('account profile is not archived');
@@ -2867,7 +2868,7 @@ export const unarchive_account_profile = async function (req) {
2867
2868
  account_profile_doc.stat_ts = Date.now();
2868
2869
  account_profile_doc.stat_reason = 'archived by the user';
2869
2870
 
2870
- const account_profile_save_ret = await db_module.save_couch_doc('xuda_accounts', account_profile_doc);
2871
+ const account_profile_save_ret = await db_module.save_app_couch_doc(app_id, account_profile_doc);
2871
2872
 
2872
2873
  return account_profile_save_ret;
2873
2874
  } else {
@@ -2944,7 +2945,7 @@ export const update_account_profile = async function (req, job_id, headers) {
2944
2945
 
2945
2946
  account_profile_doc.ts = Date.now();
2946
2947
 
2947
- const save_ret = await db_module.save_couch_doc('xuda_accounts', account_profile_doc);
2948
+ const save_ret = await db_module.save_app_couch_doc(app_id, account_profile_doc);
2948
2949
 
2949
2950
  return { code: 56, data: save_ret };
2950
2951
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1298",
3
+ "version": "1.2.1300",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {