@xuda.io/ai_module 1.1.4164 → 1.1.4165

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 +4 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2626,10 +2626,12 @@ export const uninstall_ai_agent = async function (req) {
2626
2626
  export const unarchive_ai_agent = async function (req) {
2627
2627
  let { agent_id, uid } = req;
2628
2628
 
2629
+ const account_profile_info = await account_module.get_active_account_profile_info(uid);
2630
+
2629
2631
  const app_id = await account_module.get_account_default_project_id(uid);
2630
2632
 
2631
2633
  try {
2632
- let agent_doc = await db_module.get_app_couch_doc_native(app_id, agent_id);
2634
+ let agent_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, agent_id);
2633
2635
 
2634
2636
  if (agent_doc.stat !== 5) {
2635
2637
  throw new Error('agent is not archived');
@@ -2638,7 +2640,7 @@ export const unarchive_ai_agent = async function (req) {
2638
2640
  agent_doc.stat = 3;
2639
2641
  agent_doc.ts = Date.now();
2640
2642
 
2641
- const save_ret = await db_module.save_app_couch_doc(app_id, agent_doc);
2643
+ const save_ret = await db_module.save_app_couch_doc(account_profile_info.app_id, agent_doc);
2642
2644
 
2643
2645
  return save_ret;
2644
2646
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4164",
3
+ "version": "1.1.4165",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",