@xuda.io/account_module 1.2.1099 → 1.2.1100
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 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2714,6 +2714,11 @@ export const archive_account_profile = async function (req) {
|
|
|
2714
2714
|
await validate_share_exist(uid, 'profile', profile_id);
|
|
2715
2715
|
|
|
2716
2716
|
var account_profile_doc = await db_module.get_couch_doc_native('xuda_accounts', profile_id);
|
|
2717
|
+
|
|
2718
|
+
if (account_profile_doc.reserve) {
|
|
2719
|
+
throw new Error('reserve');
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2717
2722
|
account_profile_doc.stat = 5;
|
|
2718
2723
|
account_profile_doc.stat_ts = Date.now();
|
|
2719
2724
|
account_profile_doc.stat_reason = 'archived by the user';
|