Removed invalid invoke call
Fixed `src/lib/api.ts` to stop calling the `fetch-mods` Edge Function via `supabase.functions.invoke()` and rely solely on the direct fetch with query parameters, preventing the 400 “Invalid action” runtime error. X-Lovable-Edit-ID: edt-07600d70-3647-46fc-95ef-a8fda58e3d1b Co-authored-by: felix-fx-top <253056634+felix-fx-top@users.noreply.github.com>
This commit is contained in:
commit
c125893fdf
@ -4,13 +4,6 @@ const SUPABASE_URL = import.meta.env.VITE_SUPABASE_URL;
|
||||
|
||||
async function callFetchMods(params: Record<string, string>) {
|
||||
const searchParams = new URLSearchParams(params);
|
||||
const { data, error } = await supabase.functions.invoke("fetch-mods", {
|
||||
method: "GET",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: null,
|
||||
});
|
||||
|
||||
// Use direct fetch for GET with query params
|
||||
const url = `${SUPABASE_URL}/functions/v1/fetch-mods?${searchParams.toString()}`;
|
||||
const response = await fetch(url, {
|
||||
headers: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user