From 2e3c14099636f779602e1425c49e6b2129d77588 Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Tue, 24 Sep 2024 15:48:37 +0200 Subject: [PATCH] fix API key creation reponse type --- .../backend/backend/server/routers/integrations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autogpt_platform/backend/backend/server/routers/integrations.py b/autogpt_platform/backend/backend/server/routers/integrations.py index bcf03fcb4062..5f0fa411f032 100644 --- a/autogpt_platform/backend/backend/server/routers/integrations.py +++ b/autogpt_platform/backend/backend/server/routers/integrations.py @@ -149,7 +149,7 @@ async def create_api_key_credentials( expires_at: Annotated[ int | None, Body(title="Unix timestamp when the key expires") ] = None, -): +) -> APIKeyCredentials: new_credentials = APIKeyCredentials( provider=provider, api_key=SecretStr(api_key), @@ -163,7 +163,7 @@ async def create_api_key_credentials( raise HTTPException( status_code=500, detail=f"Failed to store credentials: {str(e)}" ) - return {"id": new_credentials.id} + return new_credentials @router.delete("/{provider}/credentials/{cred_id}", status_code=204)