@xuda.io/ai_module 1.1.4092 → 1.1.4093
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
|
@@ -2554,6 +2554,11 @@ export const delete_ai_agent = async function (req) {
|
|
|
2554
2554
|
|
|
2555
2555
|
try {
|
|
2556
2556
|
let prog_doc = await db_module.get_app_couch_doc_native(app_id, agent_id);
|
|
2557
|
+
|
|
2558
|
+
if (prog_doc.stat !== 5) {
|
|
2559
|
+
throw new Error('document must be archived before deleting');
|
|
2560
|
+
}
|
|
2561
|
+
|
|
2557
2562
|
let save_ret;
|
|
2558
2563
|
if (prog_doc.studio_meta.shared_from_uid) {
|
|
2559
2564
|
// delete the share , the doc will delete by the remove_team_member
|