@xuda.io/drive_module 1.1.1104 → 1.1.1106

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.js +11 -14
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2359,20 +2359,6 @@ exports.update_drive_addons = async function (req, job_id) {
2359
2359
  ai_component_generator,
2360
2360
  edit_image,
2361
2361
  } = req;
2362
- const master_id = await _common.get_project_app_id(app_id, true);
2363
- var app_obj_ret = await db_module.get_app_obj(master_id);
2364
- const app_obj = app_obj_ret.data;
2365
- if (!app_obj.drive_addons) {
2366
- app_obj.drive_addons = {};
2367
- }
2368
-
2369
- let drive_addons = {};
2370
-
2371
- if (drive_type === "workspace" || drive_type === "studio") {
2372
- const master_id = await _common.get_project_app_id(app_id, true);
2373
- var app_obj_ret = await db_module.get_app_obj(master_id);
2374
- const app_obj = app_obj_ret.data;
2375
- }
2376
2362
 
2377
2363
  const set_drive_addons = function (drive_addons) {
2378
2364
  if (typeof ocr !== "undefined") {
@@ -2395,6 +2381,17 @@ exports.update_drive_addons = async function (req, job_id) {
2395
2381
  drive_addons.edit_image = edit_image;
2396
2382
  }
2397
2383
  };
2384
+
2385
+ let drive_addons = {};
2386
+
2387
+ if (drive_type === "workspace" || drive_type === "studio") {
2388
+ const master_id = await _common.get_project_app_id(app_id, true);
2389
+ var app_obj_ret = await db_module.get_app_obj(master_id);
2390
+ if (app_obj_ret.data.drive_addons) {
2391
+ drive_addons = app_obj_ret.data.drive_addons;
2392
+ }
2393
+ set_drive_addons();
2394
+ }
2398
2395
  };
2399
2396
 
2400
2397
  setTimeout(async function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1104",
3
+ "version": "1.1.1106",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {