@xuda.io/drive_module 1.1.1221 → 1.1.1223
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.js +4 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -575,7 +575,6 @@ exports.delete_drive_files = async function (req, job_id, headers) {
|
|
|
575
575
|
|
|
576
576
|
exports.update_drive_file = async function (req, job_id, headers, file_obj) {
|
|
577
577
|
try {
|
|
578
|
-
debugger;
|
|
579
578
|
const { drive_type, app_id, file_path, uid } = req;
|
|
580
579
|
validate_drive_type(drive_type);
|
|
581
580
|
|
|
@@ -626,17 +625,17 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
626
625
|
const app_id_reference = await _common.get_project_app_id(app_id);
|
|
627
626
|
const app_id_master = await _common.get_project_app_id(app_id, true);
|
|
628
627
|
ref = app_id_master;
|
|
629
|
-
|
|
628
|
+
|
|
630
629
|
const { data: app_obj } = await db_module.get_app_obj(app_id);
|
|
631
630
|
if (app_obj?.app_type === 'datacenter') {
|
|
632
631
|
const host = `root@${app_obj.app_hosting_server.ip}`;
|
|
633
|
-
await _utils.run_ssh_script(`scp ${tempPath} ${host}:/var/xuda/workspace_drive/${
|
|
632
|
+
await _utils.run_ssh_script(`scp ${tempPath} ${host}:/var/xuda/workspace_drive/${doc.server_file_name}; `);
|
|
634
633
|
} else if (app_obj?.is_deployment) {
|
|
635
634
|
const { data: datacenter_obj } = await db_module.get_app_obj(app_obj.app_datacenter_id);
|
|
636
635
|
const host = `root@${datacenter_obj.app_hosting_server.ip}`;
|
|
637
|
-
await _utils.run_ssh_script(`scp ${tempPath} ${host}:/var/xuda/workspace_drive/${
|
|
636
|
+
await _utils.run_ssh_script(`scp ${tempPath} ${host}:/var/xuda/workspace_drive/${doc.server_file_name}; `);
|
|
638
637
|
} else {
|
|
639
|
-
doc.bucket[`${process.env.XUDA_HOSTNAME}`] = await upload_file_to_spaces(tempPath, app_id_master, drive_type,
|
|
638
|
+
doc.bucket[`${process.env.XUDA_HOSTNAME}`] = await upload_file_to_spaces(tempPath, app_id_master, drive_type, doc.server_file_name);
|
|
640
639
|
}
|
|
641
640
|
|
|
642
641
|
save_ret = await db_module.save_app_couch_doc(app_id_reference, doc);
|