Skip to content

Commit

Permalink
AI-Powered Search History part 5
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaapple committed Jan 6, 2025
1 parent f75459e commit bdb7ce8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions frontend/app/api/history-index/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { auth } from '@/auth';
import { API_TOKEN, VECTOR_INDEX_HOST } from '@/lib/env';
import { API_TOKEN, HISTORY_HOST } from '@/lib/env';

export async function POST(req: Request) {
try {
Expand All @@ -8,7 +8,7 @@ export async function POST(req: Request) {
return Response.json({ error: 'Unauthorized' }, { status: 401 });
}

const response = await fetch(`${VECTOR_INDEX_HOST}/api/history/full`, {
const response = await fetch(`${HISTORY_HOST}/api/history/full`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/api/history-search/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { auth } from '@/auth';
import { API_TOKEN, VECTOR_HOST } from '@/lib/env';
import { API_TOKEN, HISTORY_HOST } from '@/lib/env';
import { NextResponse } from 'next/server';

export async function GET(request: Request) {
Expand All @@ -10,7 +10,7 @@ export async function GET(request: Request) {
if (!session?.user) {
return NextResponse.json({ message: 'Unauthorized' }, { status: 401 });
}
const searchUrl = `${VECTOR_HOST}/api/vector/search`;
const searchUrl = `${HISTORY_HOST}/api/vector/search`;
const response = await fetch(searchUrl, {
method: 'POST',
headers: {
Expand Down
3 changes: 3 additions & 0 deletions frontend/lib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ export const STRIPE_PREMIUM_MONTHLY_PLAN_ID = process.env.NEXT_PUBLIC_STRIPE_PRE
export const STRIPE_PREMIUM_YEARLY_PLAN_ID = process.env.NEXT_PUBLIC_STRIPE_PREMIUM_YEARLY_PLAN_ID || '';

export const NEXT_PUBLIC_APP_URL = process.env.NEXT_PUBLIC_APP_URL || '';

// HISTORY SEARCH
export const HISTORY_HOST = process.env.HISTORY_HOST || '';

0 comments on commit bdb7ce8

Please sign in to comment.