File tree Expand file tree Collapse file tree
clients/trieve-shopify-extension/app/routes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,13 +3,9 @@ import { validateTrieveAuth } from "app/auth";
33
44export 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} ;
Original file line number Diff line number Diff line change 1+ export const loader = async ( ) => {
2+ return new Response ( "OK" ) ;
3+ } ;
You can’t perform that action at this time.
0 commit comments