Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Fix API key type
Jakub Novakedaf3331f9b3
diff --git a/apps/dashboard/pages/settings/index.tsx b/apps/dashboard/pages/settings/index.tsxindex 57b07adc3..6321ed619 100644--- a/apps/dashboard/pages/settings/index.tsx+++ b/apps/dashboard/pages/settings/index.tsx@@ -23,7 +23,7 @@ export const getServerSideProps: GetServerSideProps<Props> = async (ctx) => {}let apiKeyValue: string | undefined- let apiKey = await prisma.team_api_keys.findFirst({+ const apiKey = await prisma.team_api_keys.findFirst({include: {teams: {include: {@@ -39,9 +39,10 @@ export const getServerSideProps: GetServerSideProps<Props> = async (ctx) => {},})- apiKeyValue = apiKey?.api_key- if (!apiKey) {+ if (apiKey) {+ apiKeyValue = apiKey?.api_key+ } else {const user = await prisma.auth_users.findUniqueOrThrow({where: {id: session.user.id,@@ -92,7 +93,7 @@ export const getServerSideProps: GetServerSideProps<Props> = async (ctx) => {return {props: {- apiKey: apiKey?.api_key!,+ apiKey: apiKeyValue,}}}