@xuda.io/ai_module 1.1.4182 → 1.1.4183
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 +11 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1960,7 +1960,7 @@ export const archive_ai_chat = async function (req) {
|
|
|
1960
1960
|
await team_module.validate_share_exist(uid, 'chat', conversation_id);
|
|
1961
1961
|
|
|
1962
1962
|
let conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
|
|
1963
|
-
|
|
1963
|
+
|
|
1964
1964
|
if (conversation_doc.uid !== uid && conversation_doc?.account_profile_info?.uid !== uid) {
|
|
1965
1965
|
throw new Error('Operation not allowed');
|
|
1966
1966
|
}
|
|
@@ -2658,6 +2658,11 @@ export const archive_ai_agent = async function (req) {
|
|
|
2658
2658
|
await team_module.validate_share_exist(uid, 'ai_agent', agent_id);
|
|
2659
2659
|
|
|
2660
2660
|
let agent_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, agent_id);
|
|
2661
|
+
|
|
2662
|
+
if (agent_doc.uid !== uid && agent_doc?.account_profile_info?.uid !== uid) {
|
|
2663
|
+
throw new Error('Operation not allowed');
|
|
2664
|
+
}
|
|
2665
|
+
|
|
2661
2666
|
agent_doc.stat = 5;
|
|
2662
2667
|
agent_doc.ts = Date.now();
|
|
2663
2668
|
const save_ret = await db_module.save_app_couch_doc(account_profile_info.app_id, agent_doc);
|
|
@@ -2678,6 +2683,11 @@ export const archive_mini_app = async function (req) {
|
|
|
2678
2683
|
await team_module.validate_share_exist(uid, 'miniapp', prog_id);
|
|
2679
2684
|
|
|
2680
2685
|
let prog_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, prog_id);
|
|
2686
|
+
|
|
2687
|
+
if (prog_doc.uid !== uid && prog_doc?.account_profile_info?.uid !== uid) {
|
|
2688
|
+
throw new Error('Operation not allowed');
|
|
2689
|
+
}
|
|
2690
|
+
|
|
2681
2691
|
prog_doc.stat = 5;
|
|
2682
2692
|
prog_doc.ts = Date.now();
|
|
2683
2693
|
const save_ret = await db_module.save_app_couch_doc(account_profile_info.app_id, prog_doc);
|