@xuda.io/account_module 1.2.1268 → 1.2.1269
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 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2359,9 +2359,9 @@ export const archive_contact = async function (req) {
|
|
|
2359
2359
|
};
|
|
2360
2360
|
|
|
2361
2361
|
export const delete_contact = async function (req, job_id, headers) {
|
|
2362
|
-
const { contact_id } = req;
|
|
2362
|
+
const { uid, contact_id } = req;
|
|
2363
2363
|
try {
|
|
2364
|
-
var contact_doc = await
|
|
2364
|
+
var contact_doc = await get_contact(uid, contact_id);
|
|
2365
2365
|
if (contact_doc.stat !== 5) {
|
|
2366
2366
|
throw new Error('A document can only be deleted after it has been archived');
|
|
2367
2367
|
}
|
|
@@ -2382,9 +2382,9 @@ export const delete_contact = async function (req, job_id, headers) {
|
|
|
2382
2382
|
};
|
|
2383
2383
|
|
|
2384
2384
|
export const unarchive_contact = async function (req) {
|
|
2385
|
-
const { contact_id } = req;
|
|
2385
|
+
const { uid, contact_id } = req;
|
|
2386
2386
|
try {
|
|
2387
|
-
var contact_doc = await
|
|
2387
|
+
var contact_doc = await get_contact(uid, contact_id);
|
|
2388
2388
|
|
|
2389
2389
|
if (contact_doc.stat !== 5) {
|
|
2390
2390
|
throw new Error('contact is not archived');
|