diff --git a/README.md b/README.md index b0c5057..f49ccdf 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ This repository provides a practical implementation of the Vectorize Connect SDK To fully test the features of this demonstration, you'll need to set up the following environment variables: ``` -VECTORIZE_TOKEN=your_vectorize_token -VECTORIZE_ORG=your_vectorize_org_id +VECTORIZE_API_KEY=your_vectorize_token +VECTORIZE_ORGANIZATION_ID=your_vectorize_org_id ``` ### Google Drive Features @@ -81,4 +81,4 @@ The demo application provides a user interface to test various features of the V ## Support -For questions or support with the Vectorize Connect SDK, please refer to the [official documentation](https://docs.vectorize.io) or reach out to the Vectorize support team. \ No newline at end of file +For questions or support with the Vectorize Connect SDK, please refer to the [official documentation](https://docs.vectorize.io) or reach out to the Vectorize support team. diff --git a/src/app/api/createSourceConnector/route.ts b/src/app/api/createSourceConnector/route.ts index 2232135..97f29b3 100644 --- a/src/app/api/createSourceConnector/route.ts +++ b/src/app/api/createSourceConnector/route.ts @@ -29,20 +29,20 @@ export async function POST(request: Request) { // 2. Gather environment variables for your Vectorize config const config: VectorizeAPIConfig = { - organizationId: process.env.VECTORIZE_ORG ?? "", - authorization: process.env.VECTORIZE_TOKEN ?? "", + organizationId: process.env.VECTORIZE_ORGANIZATION_ID ?? "", + authorization: process.env.VECTORIZE_API_KEY ?? "", }; // Optionally, validate environment variables before proceeding if (!config.organizationId) { return NextResponse.json( - { error: "Missing VECTORIZE_ORG in environment" }, + { error: "Missing VECTORIZE_ORGANIZATION_ID in environment" }, { status: 500 } ); } if (!config.authorization) { return NextResponse.json( - { error: "Missing VECTORIZE_TOKEN in environment" }, + { error: "Missing VECTORIZE_API_KEY in environment" }, { status: 500 } ); } @@ -118,4 +118,4 @@ export async function POST(request: Request) { console.error("Error creating connector:", error); return NextResponse.json({ error: error.message || "Unexpected error" }, { status: 500 }); } -} \ No newline at end of file +} diff --git a/src/app/api/getVectorizeConfig/route.ts b/src/app/api/getVectorizeConfig/route.ts index ab2ecf6..ff2744f 100644 --- a/src/app/api/getVectorizeConfig/route.ts +++ b/src/app/api/getVectorizeConfig/route.ts @@ -9,8 +9,8 @@ import { NextRequest, NextResponse } from "next/server"; export async function GET(request: NextRequest) { const config: VectorizeAPIConfig = { - organizationId: process.env.VECTORIZE_ORG ?? "", - authorization: process.env.VECTORIZE_TOKEN ?? "", + organizationId: process.env.VECTORIZE_ORGANIZATION_ID ?? "", + authorization: process.env.VECTORIZE_API_KEY ?? "", }; if (!config.organizationId || !config.authorization) { diff --git a/src/app/api/get_One_Time_Vectorize_Connector_Token/route.ts b/src/app/api/get_One_Time_Vectorize_Connector_Token/route.ts index e18538d..b04f9d8 100644 --- a/src/app/api/get_One_Time_Vectorize_Connector_Token/route.ts +++ b/src/app/api/get_One_Time_Vectorize_Connector_Token/route.ts @@ -12,8 +12,8 @@ import { NextRequest, NextResponse } from "next/server"; export async function GET(request: NextRequest) { try { // Get authentication details from environment variables or secure storage - const apiKey = process.env.VECTORIZE_TOKEN; - const organizationId = process.env.VECTORIZE_ORG; + const apiKey = process.env.VECTORIZE_API_KEY; + const organizationId = process.env.VECTORIZE_ORGANIZATION_ID; if (!apiKey || !organizationId) { return NextResponse.json({ @@ -69,4 +69,4 @@ export async function GET(request: NextRequest) { message: error instanceof Error ? error.message : 'Unknown error' }, { status: 500 }); } - } \ No newline at end of file + } diff --git a/src/app/api/manage-oauth-user/[connectorId]/route.ts b/src/app/api/manage-oauth-user/[connectorId]/route.ts index 1e9d413..8672c40 100644 --- a/src/app/api/manage-oauth-user/[connectorId]/route.ts +++ b/src/app/api/manage-oauth-user/[connectorId]/route.ts @@ -54,20 +54,20 @@ export async function POST(request: NextRequest) { const connectorId = segments[segments.length - 1]; const config: VectorizeAPIConfig = { - organizationId: process.env.VECTORIZE_ORG ?? "", - authorization: process.env.VECTORIZE_TOKEN ?? "", + organizationId: process.env.VECTORIZE_ORGANIZATION_ID ?? "", + authorization: process.env.VECTORIZE_API_KEY ?? "", }; // Optionally, validate environment variables before proceeding if (!config.organizationId) { return NextResponse.json( - { error: "Missing VECTORIZE_ORG in environment" }, + { error: "Missing VECTORIZE_ORGANIZATION_ID in environment" }, { status: 500 } ); } if (!config.authorization) { return NextResponse.json( - { error: "Missing VECTORIZE_TOKEN in environment" }, + { error: "Missing VECTORIZE_API_KEY in environment" }, { status: 500 } ); } @@ -193,4 +193,4 @@ export async function GET(request: NextRequest) { return buildCorsResponse({ message: 'OAuth callback endpoint is working. This endpoint expects POST requests with JSON data.' }, 200, origin); -} \ No newline at end of file +}