Skip to content

Commit 3511243

Browse files
committed
feature(shopify): move healthcheck to /health. leave root url alone
1 parent 966b3bb commit 3511243

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

clients/trieve-shopify-extension/app/routes/_index/route.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ import { validateTrieveAuth } from "app/auth";
33

44
export const loader = async ({ request }: LoaderFunctionArgs) => {
55
const url = new URL(request.url);
6-
if (url.searchParams.get("shop")) {
7-
// call validateTrieveAuth here to ensure the user is authenticated
8-
// The first time this gets called it will create a new dataset,
9-
// calling it here prevents race conditions.
10-
await validateTrieveAuth(request);
11-
throw redirect(`/app?${url.searchParams.toString()}`);
12-
}
13-
14-
return new Response("OK");
6+
// call validateTrieveAuth here to ensure the user is authenticated
7+
// The first time this gets called it will create a new dataset,
8+
// calling it here prevents race conditions.
9+
await validateTrieveAuth(request);
10+
throw redirect(`/app?${url.searchParams.toString()}`);
1511
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const loader = async () => {
2+
return new Response("OK");
3+
};

0 commit comments

Comments
 (0)