@xuda.io/ai_module 1.1.4091 → 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 +5 -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) {
|