@xuda.io/account_module 1.2.1053 → 1.2.1055
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 +5 -5
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2478,12 +2478,12 @@ setTimeout(async () => {
|
|
|
2478
2478
|
|
|
2479
2479
|
// ret = await get_account_ai_usage({ uid });
|
|
2480
2480
|
// ret = await create_account_profile({ uid });
|
|
2481
|
-
// ret = await
|
|
2481
|
+
// ret = await get_account_profiles({ uid });
|
|
2482
2482
|
|
|
2483
2483
|
console.log(ret);
|
|
2484
2484
|
}, 1000);
|
|
2485
2485
|
|
|
2486
|
-
export const
|
|
2486
|
+
export const get_account_profiles = async function (req) {
|
|
2487
2487
|
const { _id, uid, profile_name, limit, skip, bookmark, search, filter_type = 'all', profile_id } = req;
|
|
2488
2488
|
|
|
2489
2489
|
if (_id) {
|
|
@@ -2590,15 +2590,15 @@ export const get_profiles = async function (req) {
|
|
|
2590
2590
|
};
|
|
2591
2591
|
};
|
|
2592
2592
|
|
|
2593
|
-
export const
|
|
2593
|
+
export const archive_account_profile = async function (req) {
|
|
2594
2594
|
const { profile_id } = req;
|
|
2595
2595
|
try {
|
|
2596
|
-
var contact_doc = await db_module.get_couch_doc_native('
|
|
2596
|
+
var contact_doc = await db_module.get_couch_doc_native('xuda_accounts', profile_id);
|
|
2597
2597
|
contact_doc.stat = 5;
|
|
2598
2598
|
contact_doc.stat_ts = Date.now();
|
|
2599
2599
|
contact_doc.stat_reason = 'archived by the user';
|
|
2600
2600
|
|
|
2601
|
-
const contact_save_ret = await db_module.save_couch_doc('
|
|
2601
|
+
const contact_save_ret = await db_module.save_couch_doc('xuda_accounts', contact_doc);
|
|
2602
2602
|
|
|
2603
2603
|
return contact_save_ret;
|
|
2604
2604
|
} catch (err) {
|