@xuda.io/account_module 1.2.233 → 1.2.234

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 +6 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1173,8 +1173,12 @@ export const add_contact = async function (req, job_id, headers) {
1173
1173
  }
1174
1174
 
1175
1175
  let profile_picture;
1176
- const account_ret = await get_account_name({ uid_query: contact_uid });
1177
-
1176
+ if (contact_uid) {
1177
+ const account_ret = await get_account_name({ uid_query: contact_uid });
1178
+ if (account_ret.code < 0) {
1179
+ throw new Error(`account ${contact_uid} not found`);
1180
+ }
1181
+ }
1178
1182
  const d = Date.now();
1179
1183
  const doc = {
1180
1184
  _id: await _common.xuda_get_uuid('contact'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.233",
3
+ "version": "1.2.234",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {