fix: change the base url recommendation path

This commit is contained in:
Mahen 2026-05-19 14:11:12 +07:00
parent 081168d668
commit a810cb1a45
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ export const getAIRecommendation = async (
},
options?: { signal?: AbortSignal },
): Promise<AIRecommendationResponse> => {
const base_url = process.env.BACKEND_URL || "http://localhost:8000";
const base_url = process.env.BACKEND_URL? process.env.BACKEND_URL.replace(/\/+$/, "") : "http://localhost:8000";
const aiRes = await fetch(`${base_url}/recommend`, {
method: "POST",