Skip to content

Commit

Permalink
Merge branch 'staging' into remove-for-live
Browse files Browse the repository at this point in the history
  • Loading branch information
gkorland authored Nov 14, 2024
2 parents 2659794 + f03f71a commit a7062a7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/api/chat/[graph]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export async function POST(request: NextRequest, { params }: { params: { graph:
const msg = request.nextUrl.searchParams.get('msg')

try {
const result = await fetch(`${process.env.BEAKEND_URL}/chat`, {
const result = await fetch(`${process.env.BACKEND_URL}/chat`, {
method: 'POST',
body: JSON.stringify({ repo: graphName, msg }),
headers: {
Expand Down
4 changes: 2 additions & 2 deletions app/api/repo/[graph]/[node]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export async function GET(request: NextRequest, { params }: { params: { graph: s
const graphId = params.graph;
try {

const result = await fetch(`${process.env.BEAKEND_URL}/get_neighbors?repo=${graphId}&node_id=${nodeId}`, {
const result = await fetch(`${process.env.BACKEND_URL}/get_neighbors?repo=${graphId}&node_id=${nodeId}`, {
method: 'GET',
headers: {
"Authorization": process.env.SECRET_TOKEN!,
Expand All @@ -29,7 +29,7 @@ export async function POST(request: NextRequest, { params }: { params: { graph:

try {

const result = await fetch(`${process.env.BEAKEND_URL}/find_paths`, {
const result = await fetch(`${process.env.BACKEND_URL}/find_paths`, {
method: 'POST',
headers: {
"Authorization": process.env.SECRET_TOKEN!,
Expand Down
6 changes: 3 additions & 3 deletions app/api/repo/[graph]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function GET(request: NextRequest, { params }: { params: { graph: s
const graphName = params.graph

try {
const result = await fetch(`${process.env.BEAKEND_URL}/graph_entities?repo=${graphName}`, {
const result = await fetch(`${process.env.BACKEND_URL}/graph_entities?repo=${graphName}`, {
method: 'GET',
headers: {
"Authorization": process.env.SECRET_TOKEN!,
Expand Down Expand Up @@ -212,7 +212,7 @@ export async function POST(request: NextRequest, { params }: { params: { graph:
// }
case "autoComplete": {
const prefix = request.nextUrl.searchParams.get('prefix')!
const result = await fetch(`${process.env.BEAKEND_URL}/auto_complete`, {
const result = await fetch(`${process.env.BACKEND_URL}/auto_complete`, {
method: 'POST',
body: JSON.stringify({ repo: graphName, prefix }),
headers: {
Expand All @@ -230,7 +230,7 @@ export async function POST(request: NextRequest, { params }: { params: { graph:
return NextResponse.json({ result: json }, { status: 200 })
}
default: {
const result = await fetch(`${process.env.BEAKEND_URL}/repo_info`, {
const result = await fetch(`${process.env.BACKEND_URL}/repo_info`, {
method: 'POST',
body: JSON.stringify({ repo: graphName }),
headers: {
Expand Down
4 changes: 2 additions & 2 deletions app/api/repo/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from "next/server";

export async function GET() {
try {
const result = await fetch(`${process.env.BEAKEND_URL}/list_repos`, {
const result = await fetch(`${process.env.BACKEND_URL}/list_repos`, {
method: 'GET',
headers: {
"Authorization": process.env.SECRET_TOKEN!,
Expand Down Expand Up @@ -43,4 +43,4 @@ export async function GET() {
// } catch (err) {
// return NextResponse.json({ message: (err as Error).message }, { status: 400 })
// }
// }
// }

0 comments on commit a7062a7

Please sign in to comment.