@xuda.io/ai_module 1.1.4089 → 1.1.4091
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 +8 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2645,6 +2645,9 @@ export const archive_mini_app = async function (req) {
|
|
|
2645
2645
|
|
|
2646
2646
|
const app_id = await account_module.get_account_default_project_id(uid);
|
|
2647
2647
|
try {
|
|
2648
|
+
const team_module = await import(`${module_path}/team_module/index.mjs`);
|
|
2649
|
+
await team_module.validate_share_exist(uid, 'miniapp', prog_id);
|
|
2650
|
+
|
|
2648
2651
|
let prog_doc = await db_module.get_app_couch_doc_native(app_id, prog_id);
|
|
2649
2652
|
prog_doc.stat = 5;
|
|
2650
2653
|
prog_doc.ts = Date.now();
|
|
@@ -2683,6 +2686,11 @@ export const delete_mini_app = async function (req) {
|
|
|
2683
2686
|
const app_id = await account_module.get_account_default_project_id(uid);
|
|
2684
2687
|
try {
|
|
2685
2688
|
let prog_doc = await db_module.get_app_couch_doc_native(app_id, prog_id);
|
|
2689
|
+
|
|
2690
|
+
if (prog_doc.stat !== 5) {
|
|
2691
|
+
throw new Error('document must be archived before deleting');
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2686
2694
|
let save_ret;
|
|
2687
2695
|
if (prog_doc.studio_meta.shared_from_uid) {
|
|
2688
2696
|
// delete the share , the doc will delete by the remove_team_member
|