@xuda.io/ai_module 1.1.3706 → 1.1.3708
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 +11 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2608,10 +2608,17 @@ export const delete_mini_app = async function (req) {
|
|
|
2608
2608
|
const app_id = await account_module.get_account_default_project_id(uid);
|
|
2609
2609
|
try {
|
|
2610
2610
|
let prog_doc = await db_module.get_app_couch_doc_native(app_id, prog_id);
|
|
2611
|
-
|
|
2612
|
-
prog_doc.
|
|
2613
|
-
|
|
2614
|
-
|
|
2611
|
+
let save_ret;
|
|
2612
|
+
if (prog_doc.studio_meta.shared_from_uid) {
|
|
2613
|
+
// delete the share , the doc will delete by the remove_team_member
|
|
2614
|
+
const team_module = await import(`${module_path}/team_module/index.mjs`);
|
|
2615
|
+
save_ret = await team_module.remove_team_member({ team_req_id: prog_doc.studio_meta.team_req_id });
|
|
2616
|
+
} else {
|
|
2617
|
+
prog_doc.stat = 4;
|
|
2618
|
+
prog_doc.ts = Date.now();
|
|
2619
|
+
save_ret = await db_module.save_app_couch_doc(app_id, prog_doc);
|
|
2620
|
+
delete_depended_chats(uid, prog_id);
|
|
2621
|
+
}
|
|
2615
2622
|
return save_ret;
|
|
2616
2623
|
} catch (err) {
|
|
2617
2624
|
return { code: -9, data: err.message };
|