From 8f7b9a1a87c67ce1eeea99fd60a5660c22f5c659 Mon Sep 17 00:00:00 2001 From: Joshua Coles Date: Sun, 3 Dec 2023 23:32:03 +0000 Subject: [PATCH] Change backend URL to be root as opposed to localhost --- src/App.tsx | 4 ++-- src/NaiveSelect.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index e9a8a40..f2f3ed6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -33,7 +33,7 @@ export function OmnisearchSelect({setSelected}: { initialData: [], refetchInterval: false, queryFn: async () => { - const response = await fetch("http://localhost:9002/metadata") + const response = await fetch("/metadata") const fullData: any[] = await response.json(); return fullData; }, @@ -49,7 +49,7 @@ export function OmnisearchSelect({setSelected}: { if (query === '') { return []; } else { - const response = await fetch(`http://localhost:9002/search?q=${query}`) + const response = await fetch(`/search?q=${query}`) const fullData: ResultNoteApi[] = await response.json(); return fullData; diff --git a/src/NaiveSelect.tsx b/src/NaiveSelect.tsx index 6e204c4..55169a5 100644 --- a/src/NaiveSelect.tsx +++ b/src/NaiveSelect.tsx @@ -45,7 +45,7 @@ export function NaiveSelect({setSelected}: { queryKey: ['obsidian-metadata'], initialData: [], queryFn: async () => { - const response = await fetch("http://localhost:9002/metadata") + const response = await fetch("/metadata") const fullData: any[] = await response.json(); return R.sortBy(v => -(v.data.backlinks?.length ?? 0), fullData.map(md => ({