Skip to content

Commit

Permalink
Merge pull request #183 from Azure-Samples/gk/bump-java-usage-fix-bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
thegovind authored Nov 13, 2023
2 parents 9844417 + c6cc74f commit b86ac13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/typescript/app/personalize/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NextResponse } from 'next/server';

export async function POST(request: Request) {
console.dir(request);
const personalizeUrl = `${process.env.NEXT_PUBLIC_RECCOMMENDATION_SERVICE_URL}/personalize`
const personalizeUrl = `${process.env.NEXT_PUBLIC_RECCOMMENDATION_SERVICE_URL?.replace(/\/+$/, '')}/personalize`
const { body } = request
console.log("Request body: ");
console.dir(body)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function PersonalizeDrawer() {
stocks,
};

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

0 comments on commit b86ac13

Please sign in to comment.