Skip to content

Commit

Permalink
Add OneDrive name and description to the drives list
Browse files Browse the repository at this point in the history
  • Loading branch information
themylogin committed Jan 20, 2025
1 parent 972ad20 commit a2de71d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/middlewared/middlewared/api/v25_04_0/cloud_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,5 @@ class CloudSyncOneDriveListDrivesResult(BaseModel):
class CloudSyncOneDriveListDrivesDrive(BaseModel):
drive_id: str
drive_type: Literal["PERSONAL", "BUSINESS", "DOCUMENT_LIBRARY"]
name: str
description: str
2 changes: 2 additions & 0 deletions src/middlewared/middlewared/rclone/remote/onedrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down

0 comments on commit a2de71d

Please sign in to comment.