@xuda.io/account_module 1.2.1283 → 1.2.1285
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.
- package/index.mjs +4 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2117,7 +2117,10 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2117
2117
|
limit: 1,
|
|
2118
2118
|
fields: ['_id'],
|
|
2119
2119
|
};
|
|
2120
|
-
const user_contacts = await find_contact_query(
|
|
2120
|
+
const user_contacts = await find_contact_query(uid, opt);
|
|
2121
|
+
if (user_contacts.docs.length) {
|
|
2122
|
+
throw new Error('contact already exist active');
|
|
2123
|
+
}
|
|
2121
2124
|
|
|
2122
2125
|
/////////////////
|
|
2123
2126
|
|