@xuda.io/account_module 1.2.1267 → 1.2.1268

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 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2332,12 +2332,12 @@ export const get_contacts = async function (req) {
2332
2332
  };
2333
2333
 
2334
2334
  export const archive_contact = async function (req) {
2335
- const { contact_id } = req;
2335
+ const { uid, contact_id } = req;
2336
2336
  try {
2337
2337
  const team_module = await import(`${module_path}/team_module/index.mjs`);
2338
2338
  await team_module.validate_share_exist(uid, 'contact', contact_id);
2339
2339
 
2340
- var contact_doc = await db_module.get_couch_doc_native('xuda_contacts', contact_id);
2340
+ var contact_doc = await get_contact(uid, contact_id);
2341
2341
 
2342
2342
  if (contact_doc.uid !== uid && contact_doc?.account_profile_info?.uid !== uid) {
2343
2343
  throw new Error('Operation not allowed');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1267",
3
+ "version": "1.2.1268",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {