@xuda.io/ai_module 1.1.4220 → 1.1.4221
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 +8 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2817,8 +2817,8 @@ export const update_ai_agent = async function (req, job_id, headers) {
|
|
|
2817
2817
|
// };
|
|
2818
2818
|
|
|
2819
2819
|
export const get_apps = async function (req, job_id, headers) {
|
|
2820
|
-
let { uid, _id, search, filter_type = 'all', limit, skip, mini_app_id } = req;
|
|
2821
|
-
|
|
2820
|
+
let { uid, _id, search, filter_type = 'all', limit, skip, mini_app_id, profile_id } = req;
|
|
2821
|
+
const account_profile_info = await account_module.get_active_account_profile_info(uid, profile_id);
|
|
2822
2822
|
try {
|
|
2823
2823
|
if (_id) return await get_studio_doc({ _id, uid });
|
|
2824
2824
|
///////////////
|
|
@@ -2833,6 +2833,10 @@ export const get_apps = async function (req, job_id, headers) {
|
|
|
2833
2833
|
sort: [{ ts: 'desc' }],
|
|
2834
2834
|
};
|
|
2835
2835
|
|
|
2836
|
+
if (!account_profile_info.is_main) {
|
|
2837
|
+
opt.selector['studio_meta.account_profiles'] = { $in: [account_profile_info.account_profile_id] };
|
|
2838
|
+
}
|
|
2839
|
+
|
|
2836
2840
|
switch (filter_type) {
|
|
2837
2841
|
case 'archived': {
|
|
2838
2842
|
opt.selector.stat = 5;
|
|
@@ -2881,8 +2885,8 @@ export const get_apps = async function (req, job_id, headers) {
|
|
|
2881
2885
|
opt.selector._id = mini_app_id;
|
|
2882
2886
|
}
|
|
2883
2887
|
//////////////
|
|
2884
|
-
|
|
2885
|
-
const app_id = await account_module.get_account_default_project_id(uid);
|
|
2888
|
+
|
|
2889
|
+
// const app_id = await account_module.get_account_default_project_id(uid);
|
|
2886
2890
|
|
|
2887
2891
|
let user_apps = { docs: [], total_docs: 0 };
|
|
2888
2892
|
if (filter_type !== 'pending') {
|