From a2de71d3223699b679dce5ba11d05e16dd18cb1d Mon Sep 17 00:00:00 2001 From: themylogin Date: Mon, 20 Jan 2025 17:47:47 +0100 Subject: [PATCH] Add OneDrive name and description to the drives list --- src/middlewared/middlewared/api/v25_04_0/cloud_sync.py | 2 ++ src/middlewared/middlewared/rclone/remote/onedrive.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/middlewared/middlewared/api/v25_04_0/cloud_sync.py b/src/middlewared/middlewared/api/v25_04_0/cloud_sync.py index e3ef04d45a786..c965b2e5a99a7 100644 --- a/src/middlewared/middlewared/api/v25_04_0/cloud_sync.py +++ b/src/middlewared/middlewared/api/v25_04_0/cloud_sync.py @@ -104,3 +104,5 @@ class CloudSyncOneDriveListDrivesResult(BaseModel): class CloudSyncOneDriveListDrivesDrive(BaseModel): drive_id: str drive_type: Literal["PERSONAL", "BUSINESS", "DOCUMENT_LIBRARY"] + name: str + description: str diff --git a/src/middlewared/middlewared/rclone/remote/onedrive.py b/src/middlewared/middlewared/rclone/remote/onedrive.py index 96622ae58814c..faf3207327b63 100644 --- a/src/middlewared/middlewared/rclone/remote/onedrive.py +++ b/src/middlewared/middlewared/rclone/remote/onedrive.py @@ -71,6 +71,8 @@ def process_drive(drive): return { "drive_type": DRIVES_TYPES_INV.get(drive["driveType"], ""), "drive_id": drive["id"], + "name": drive.get("name") or "", + "description": drive.get("description") or "", } result = []