Skip to content

Commit b86ac13

Browse files
authored
Merge pull request #183 from Azure-Samples/gk/bump-java-usage-fix-bugs
2 parents 9844417 + c6cc74f commit b86ac13

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ui/typescript/app/personalize/route.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { NextResponse } from 'next/server';
22

33
export async function POST(request: Request) {
44
console.dir(request);
5-
const personalizeUrl = `${process.env.NEXT_PUBLIC_RECCOMMENDATION_SERVICE_URL}/personalize`
5+
const personalizeUrl = `${process.env.NEXT_PUBLIC_RECCOMMENDATION_SERVICE_URL?.replace(/\/+$/, '')}/personalize`
66
const { body } = request
77
console.log("Request body: ");
88
console.dir(body)

ui/typescript/src/components/personalize/personalize-drawer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default function PersonalizeDrawer() {
7676
stocks,
7777
};
7878

79-
const response = await fetch(`${process.env.NEXT_PUBLIC_RECCOMMENDATION_SERVICE_URL}/personalize`, {
79+
const response = await fetch(`${process.env.NEXT_PUBLIC_RECCOMMENDATION_SERVICE_URL?.replace(/\/+$/, '')}/personalize`, {
8080
method: 'POST',
8181
headers: {
8282
'Content-Type': 'application/json',

0 commit comments

Comments
 (0)