diff --git a/autogpt_platform/backend/backend/server/v2/store/routes.py b/autogpt_platform/backend/backend/server/v2/store/routes.py index ce19f310d440..0af5e4380766 100644 --- a/autogpt_platform/backend/backend/server/v2/store/routes.py +++ b/autogpt_platform/backend/backend/server/v2/store/routes.py @@ -514,7 +514,7 @@ async def generate_image( status_code=500, detail=f"Failed to generate image: {str(e)}" ) -@router.get("/download/agents/{store_listing_version_id}/{version}",tags=["store","public"],) +@router.get("/download/agents/{store_listing_version_id}",tags=["store","public"],) async def download_agent_file( store_listing_version_id: str = fastapi.Path(..., description="The ID of the agent to download"), version: typing.Optional[int] = fastapi.Query( diff --git a/autogpt_platform/frontend/src/lib/autogpt-server-api/client.ts b/autogpt_platform/frontend/src/lib/autogpt-server-api/client.ts index a01b5b9426d8..88fcd6817c38 100644 --- a/autogpt_platform/frontend/src/lib/autogpt-server-api/client.ts +++ b/autogpt_platform/frontend/src/lib/autogpt-server-api/client.ts @@ -352,7 +352,9 @@ export default class BackendAPI { storeListingVersionId: string, version?: number, ): Promise { - return this._get(`/download/agents/${storeListingVersionId}/${version}`); + return this._get( + `/download/agents/${storeListingVersionId}?version=${version}`, + ); } /////////////////////////////////////////