@xuda.io/ai_module 1.1.4090 → 1.1.4092
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 +10 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1918,6 +1918,11 @@ export const delete_ai_chat = async function (req) {
|
|
|
1918
1918
|
|
|
1919
1919
|
const app_id = await account_module.get_account_default_project_id(uid);
|
|
1920
1920
|
let conversation_doc = await db_module.get_app_couch_doc_native(app_id, conversation_id);
|
|
1921
|
+
|
|
1922
|
+
if (conversation_doc.stat !== 5) {
|
|
1923
|
+
throw new Error('document must be archived before deleting');
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1921
1926
|
let save_ret;
|
|
1922
1927
|
try {
|
|
1923
1928
|
if (conversation_doc.shared_from_uid) {
|
|
@@ -2686,6 +2691,11 @@ export const delete_mini_app = async function (req) {
|
|
|
2686
2691
|
const app_id = await account_module.get_account_default_project_id(uid);
|
|
2687
2692
|
try {
|
|
2688
2693
|
let prog_doc = await db_module.get_app_couch_doc_native(app_id, prog_id);
|
|
2694
|
+
|
|
2695
|
+
if (prog_doc.stat !== 5) {
|
|
2696
|
+
throw new Error('document must be archived before deleting');
|
|
2697
|
+
}
|
|
2698
|
+
|
|
2689
2699
|
let save_ret;
|
|
2690
2700
|
if (prog_doc.studio_meta.shared_from_uid) {
|
|
2691
2701
|
// delete the share , the doc will delete by the remove_team_member
|