@xuda.io/account_module 1.2.1097 → 1.2.1099
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 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2439,7 +2439,7 @@ export const get_account_ai_usage = async function (req, job_id, headers) {
|
|
|
2439
2439
|
};
|
|
2440
2440
|
|
|
2441
2441
|
export const create_account_profile = async function (req, job_id, headers) {
|
|
2442
|
-
const { uid, profile_name, profile_signature, profile_email, profile_picture, profile_avatar, profile_picture_obj, profile_avatar_obj } = req;
|
|
2442
|
+
const { uid, profile_name, profile_signature, profile_email, profile_picture, profile_avatar, profile_picture_obj, profile_avatar_obj, reserve } = req;
|
|
2443
2443
|
try {
|
|
2444
2444
|
// const app_id = await get_account_default_project_id(uid);
|
|
2445
2445
|
const { data: acc_obj } = await db_module.get_couch_doc('xuda_accounts', uid);
|
|
@@ -2460,6 +2460,7 @@ export const create_account_profile = async function (req, job_id, headers) {
|
|
|
2460
2460
|
profile_avatar,
|
|
2461
2461
|
profile_picture_obj,
|
|
2462
2462
|
profile_avatar_obj,
|
|
2463
|
+
reserve,
|
|
2463
2464
|
};
|
|
2464
2465
|
const save_ret = await db_module.save_couch_doc('xuda_accounts', doc);
|
|
2465
2466
|
// acc_obj.active_profile_id = save_ret.data.id;
|
|
@@ -2708,8 +2709,10 @@ export const get_account_profiles = async function (req) {
|
|
|
2708
2709
|
};
|
|
2709
2710
|
|
|
2710
2711
|
export const archive_account_profile = async function (req) {
|
|
2711
|
-
const { profile_id } = req;
|
|
2712
|
+
const { uid, profile_id } = req;
|
|
2712
2713
|
try {
|
|
2714
|
+
await validate_share_exist(uid, 'profile', profile_id);
|
|
2715
|
+
|
|
2713
2716
|
var account_profile_doc = await db_module.get_couch_doc_native('xuda_accounts', profile_id);
|
|
2714
2717
|
account_profile_doc.stat = 5;
|
|
2715
2718
|
account_profile_doc.stat_ts = Date.now();
|