Skip to content

Commit 6ea9020

Browse files
authored
Merge pull request #10 from vectorize-io/devin/1751035551-update-env-var-names
Update environment variable names: VECTORIZE_TOKEN → VECTORIZE_API_KEY, VECTORIZE_ORG → VECTORIZE_ORGANIZATION_ID
2 parents 26a8a41 + 45e8421 commit 6ea9020

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ This repository provides a practical implementation of the Vectorize Connect SDK
2424
To fully test the features of this demonstration, you'll need to set up the following environment variables:
2525

2626
```
27-
VECTORIZE_TOKEN=your_vectorize_token
28-
VECTORIZE_ORG=your_vectorize_org_id
27+
VECTORIZE_API_KEY=your_vectorize_token
28+
VECTORIZE_ORGANIZATION_ID=your_vectorize_org_id
2929
```
3030

3131
### Google Drive Features
@@ -81,4 +81,4 @@ The demo application provides a user interface to test various features of the V
8181

8282
## Support
8383

84-
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.
84+
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.

src/app/api/createSourceConnector/route.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ export async function POST(request: Request) {
2929

3030
// 2. Gather environment variables for your Vectorize config
3131
const config: VectorizeAPIConfig = {
32-
organizationId: process.env.VECTORIZE_ORG ?? "",
33-
authorization: process.env.VECTORIZE_TOKEN ?? "",
32+
organizationId: process.env.VECTORIZE_ORGANIZATION_ID ?? "",
33+
authorization: process.env.VECTORIZE_API_KEY ?? "",
3434
};
3535

3636
// Optionally, validate environment variables before proceeding
3737
if (!config.organizationId) {
3838
return NextResponse.json(
39-
{ error: "Missing VECTORIZE_ORG in environment" },
39+
{ error: "Missing VECTORIZE_ORGANIZATION_ID in environment" },
4040
{ status: 500 }
4141
);
4242
}
4343
if (!config.authorization) {
4444
return NextResponse.json(
45-
{ error: "Missing VECTORIZE_TOKEN in environment" },
45+
{ error: "Missing VECTORIZE_API_KEY in environment" },
4646
{ status: 500 }
4747
);
4848
}
@@ -118,4 +118,4 @@ export async function POST(request: Request) {
118118
console.error("Error creating connector:", error);
119119
return NextResponse.json({ error: error.message || "Unexpected error" }, { status: 500 });
120120
}
121-
}
121+
}

src/app/api/getVectorizeConfig/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import { NextRequest, NextResponse } from "next/server";
99
export async function GET(request: NextRequest) {
1010

1111
const config: VectorizeAPIConfig = {
12-
organizationId: process.env.VECTORIZE_ORG ?? "",
13-
authorization: process.env.VECTORIZE_TOKEN ?? "",
12+
organizationId: process.env.VECTORIZE_ORGANIZATION_ID ?? "",
13+
authorization: process.env.VECTORIZE_API_KEY ?? "",
1414
};
1515

1616
if (!config.organizationId || !config.authorization) {

src/app/api/get_One_Time_Vectorize_Connector_Token/route.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { NextRequest, NextResponse } from "next/server";
1212
export async function GET(request: NextRequest) {
1313
try {
1414
// Get authentication details from environment variables or secure storage
15-
const apiKey = process.env.VECTORIZE_TOKEN;
16-
const organizationId = process.env.VECTORIZE_ORG;
15+
const apiKey = process.env.VECTORIZE_API_KEY;
16+
const organizationId = process.env.VECTORIZE_ORGANIZATION_ID;
1717

1818
if (!apiKey || !organizationId) {
1919
return NextResponse.json({
@@ -69,4 +69,4 @@ export async function GET(request: NextRequest) {
6969
message: error instanceof Error ? error.message : 'Unknown error'
7070
}, { status: 500 });
7171
}
72-
}
72+
}

src/app/api/manage-oauth-user/[connectorId]/route.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,20 @@ export async function POST(request: NextRequest) {
5454
const connectorId = segments[segments.length - 1];
5555

5656
const config: VectorizeAPIConfig = {
57-
organizationId: process.env.VECTORIZE_ORG ?? "",
58-
authorization: process.env.VECTORIZE_TOKEN ?? "",
57+
organizationId: process.env.VECTORIZE_ORGANIZATION_ID ?? "",
58+
authorization: process.env.VECTORIZE_API_KEY ?? "",
5959
};
6060

6161
// Optionally, validate environment variables before proceeding
6262
if (!config.organizationId) {
6363
return NextResponse.json(
64-
{ error: "Missing VECTORIZE_ORG in environment" },
64+
{ error: "Missing VECTORIZE_ORGANIZATION_ID in environment" },
6565
{ status: 500 }
6666
);
6767
}
6868
if (!config.authorization) {
6969
return NextResponse.json(
70-
{ error: "Missing VECTORIZE_TOKEN in environment" },
70+
{ error: "Missing VECTORIZE_API_KEY in environment" },
7171
{ status: 500 }
7272
);
7373
}
@@ -193,4 +193,4 @@ export async function GET(request: NextRequest) {
193193
return buildCorsResponse({
194194
message: 'OAuth callback endpoint is working. This endpoint expects POST requests with JSON data.'
195195
}, 200, origin);
196-
}
196+
}

0 commit comments

Comments
 (0)