@xuda.io/account_module 1.2.1269 → 1.2.1271

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 -6
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2406,13 +2406,9 @@ export const unarchive_contact = async function (req) {
2406
2406
  };
2407
2407
 
2408
2408
  export const unfriend_contact = async function (req) {
2409
- const { contact_id } = req;
2409
+ const { uid, contact_id } = req;
2410
2410
  try {
2411
- const contact_ret = await db_module.get_couch_doc('xuda_contacts', contact_id);
2412
- if (contact_ret.code < 0) {
2413
- throw new Error(contact_ret.data);
2414
- }
2415
- var contact_doc = contact_ret.data;
2411
+ let contact_doc = await get_contact(uid, contact_id);
2416
2412
 
2417
2413
  if (!contact_doc.team_req_id) {
2418
2414
  throw new Error('no friend relationship found');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1269",
3
+ "version": "1.2.1271",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {