From 7f20c903ef23e138518e715c7c7a0297d3e46ff8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 01:30:17 +0000 Subject: [PATCH] fix(api): remove duplicate Depends from AdminUser parameters in dropbox, onedrive, google_drive Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> Agent-Logs-Url: https://github.com/christianlouis/DocuElevate/sessions/18477ff5-a7a6-4806-a07b-076789c4a72b --- app/api/dropbox.py | 4 ++-- app/api/google_drive.py | 4 ++-- app/api/onedrive.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/api/dropbox.py b/app/api/dropbox.py index 3236ca83..887adf20 100644 --- a/app/api/dropbox.py +++ b/app/api/dropbox.py @@ -399,11 +399,11 @@ async def list_dropbox_folders( async def save_dropbox_settings( request: Request, refresh_token: Annotated[str, Form(...)], + _admin: AdminUser, + db: Session = Depends(get_db), app_key: Annotated[Optional[str], Form()] = None, app_secret: Annotated[Optional[str], Form()] = None, folder_path: Annotated[Optional[str], Form()] = None, - _admin: AdminUser = Depends(_require_admin), - db: Session = Depends(get_db), ): """ Save Dropbox settings to database (primary) and .env file (best-effort). diff --git a/app/api/google_drive.py b/app/api/google_drive.py index 2f6822f6..20affdc5 100644 --- a/app/api/google_drive.py +++ b/app/api/google_drive.py @@ -376,12 +376,12 @@ def format_time_remaining(time_delta): async def save_google_drive_settings( request: Request, refresh_token: Annotated[str, Form(...)], + _admin: AdminUser, + db: Session = Depends(get_db), client_id: Annotated[Optional[str], Form()] = None, client_secret: Annotated[Optional[str], Form()] = None, folder_id: Annotated[Optional[str], Form()] = None, use_oauth: Annotated[str, Form()] = "true", - _admin: AdminUser = Depends(_require_admin), - db: Session = Depends(get_db), ): """ Save Google Drive settings to the .env file (best-effort) and persist to database. diff --git a/app/api/onedrive.py b/app/api/onedrive.py index 6e722e6b..5c089f34 100644 --- a/app/api/onedrive.py +++ b/app/api/onedrive.py @@ -316,12 +316,12 @@ def format_time_remaining(time_delta): async def save_onedrive_settings( request: Request, refresh_token: Annotated[str, Form(...)], + _admin: AdminUser, + db: Session = Depends(get_db), client_id: Annotated[Optional[str], Form()] = None, client_secret: Annotated[Optional[str], Form()] = None, tenant_id: Annotated[str, Form()] = "common", folder_path: Annotated[Optional[str], Form()] = None, - _admin: AdminUser = Depends(_require_admin), - db: Session = Depends(get_db), ): """ Saves to database (primary) and .env file (best-effort).