@xuda.io/drive_module 1.1.1103 → 1.1.1105

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 +17 -15
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2359,22 +2359,8 @@ 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
2362
 
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
-
2377
- const set_drive_addons = function () {
2363
+ const set_drive_addons = function (drive_addons) {
2378
2364
  if (typeof ocr !== "undefined") {
2379
2365
  drive_addons.ocr = ocr;
2380
2366
  }
@@ -2395,6 +2381,22 @@ exports.update_drive_addons = async function (req, job_id) {
2395
2381
  drive_addons.edit_image = edit_image;
2396
2382
  }
2397
2383
  };
2384
+
2385
+ const master_id = await _common.get_project_app_id(app_id, true);
2386
+ var app_obj_ret = await db_module.get_app_obj(master_id);
2387
+ const app_obj = app_obj_ret.data;
2388
+ if (!app_obj.drive_addons) {
2389
+ app_obj.drive_addons = {};
2390
+ }
2391
+
2392
+ let drive_addons = {};
2393
+
2394
+ if (drive_type === "workspace" || drive_type === "studio") {
2395
+ const master_id = await _common.get_project_app_id(app_id, true);
2396
+ var app_obj_ret = await db_module.get_app_obj(master_id);
2397
+ const app_obj = app_obj_ret.data;
2398
+ set_drive_addons(app_obj.drive_addons);
2399
+ }
2398
2400
  };
2399
2401
 
2400
2402
  setTimeout(async function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1103",
3
+ "version": "1.1.1105",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {