From 46495937b1690870c861bc652260a9bc94aa7da0 Mon Sep 17 00:00:00 2001
From: ssongliu <73214554+ssongliu@users.noreply.github.com>
Date: Mon, 3 Jul 2023 12:28:18 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20sftp=20=E5=8E=BB=E6=8E=89=E9=87=8D?=
=?UTF-8?q?=E5=A4=8D=E7=9A=84=E5=A4=87=E4=BB=BD=E6=96=87=E4=BB=B6=E5=A4=B9?=
=?UTF-8?q?=20(#1509)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
backend/utils/cloud_storage/client/onedrive.go | 6 +++++-
frontend/src/views/setting/backup-account/index.vue | 3 ---
.../src/views/setting/backup-account/operate/index.vue | 10 +++++-----
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/backend/utils/cloud_storage/client/onedrive.go b/backend/utils/cloud_storage/client/onedrive.go
index 7568e8e20..084f77ffe 100644
--- a/backend/utils/cloud_storage/client/onedrive.go
+++ b/backend/utils/cloud_storage/client/onedrive.go
@@ -223,7 +223,11 @@ func (onedrive *oneDriveClient) ListObjects(prefix string) ([]interface{}, error
}
func (onedrive *oneDriveClient) loadIDByPath(path string) (string, error) {
- req, err := onedrive.client.NewRequest("GET", fmt.Sprintf("me/drive/root:%s", path), nil)
+ pathItem := "root:" + path
+ if path == "/" {
+ pathItem = "root"
+ }
+ req, err := onedrive.client.NewRequest("GET", fmt.Sprintf("me/drive/%s", pathItem), nil)
if err != nil {
return "", fmt.Errorf("new request for file id failed, err: %v", err)
}
diff --git a/frontend/src/views/setting/backup-account/index.vue b/frontend/src/views/setting/backup-account/index.vue
index acf6cd547..f1d3f7984 100644
--- a/frontend/src/views/setting/backup-account/index.vue
+++ b/frontend/src/views/setting/backup-account/index.vue
@@ -349,9 +349,6 @@
{{ sftpData.bucket }}
-
- {{ sftpData.backupPath }}
-
{{ dateFormat(0, 0, sftpData.createdAt) }}
diff --git a/frontend/src/views/setting/backup-account/operate/index.vue b/frontend/src/views/setting/backup-account/operate/index.vue
index f4fc2da31..23949375a 100644
--- a/frontend/src/views/setting/backup-account/operate/index.vue
+++ b/frontend/src/views/setting/backup-account/operate/index.vue
@@ -189,11 +189,11 @@
/>
-
+
-
+