@xuda.io/ai_module 1.1.4090 → 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.
Files changed (2) hide show
  1. package/index.mjs +5 -0
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2686,6 +2686,11 @@ export const delete_mini_app = async function (req) {
2686
2686
  const app_id = await account_module.get_account_default_project_id(uid);
2687
2687
  try {
2688
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
+
2689
2694
  let save_ret;
2690
2695
  if (prog_doc.studio_meta.shared_from_uid) {
2691
2696
  // delete the share , the doc will delete by the remove_team_member
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4090",
3
+ "version": "1.1.4091",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",