@xuda.io/drive_module 1.1.1202 → 1.1.1204

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 +3 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -516,13 +516,14 @@ exports.delete_drive_files = async function (req, job_id, headers) {
516
516
  if (doc.bucket) {
517
517
  await module.exports.delete_file_from_bucket(doc.bucket);
518
518
  } else {
519
+ const { data: app_obj } = await db_module.get_app_obj(app_id);
519
520
  if (app_obj?.app_type === 'datacenter') {
520
521
  const host = `root@${app_obj.app_hosting_server.ip}`;
521
- await _utils.run_ssh_script(`scp ${tempPath} ${host}:/var/xuda/workspace_drive/${file_name}; `);
522
+ await _utils.run_ssh_script(`ssh rm ${host}:/var/xuda/workspace_drive/${file_name}; `);
522
523
  } else if (app_obj?.is_deployment) {
523
524
  const { data: datacenter_obj } = await db_module.get_app_obj(app_obj.app_datacenter_id);
524
525
  const host = `root@${datacenter_obj.app_hosting_server.ip}`;
525
- await _utils.run_ssh_script(`scp ${tempPath} ${host}:/var/xuda/workspace_drive/${file_name}; `);
526
+ await _utils.run_ssh_script(`ssh rm ${host}:/var/xuda/workspace_drive/${file_name}; `);
526
527
  }
527
528
  }
528
529
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1202",
3
+ "version": "1.1.1204",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {