diff --git a/src/modules/garden/components/plant-form.tsx b/src/modules/garden/components/plant-form.tsx index 6f2d74b..9d6c2a6 100644 --- a/src/modules/garden/components/plant-form.tsx +++ b/src/modules/garden/components/plant-form.tsx @@ -156,7 +156,7 @@ export function PlantForm({ existingPlant, defaultContainerId, containers }: Pro initialValue={existingPlant?.scientificName ?? ""} />

- Search Perenual to auto-fill scientific name and care notes. + Search OpenPlantBook to auto-fill scientific name and care notes.

diff --git a/src/modules/garden/server/species-lookup.ts b/src/modules/garden/server/species-lookup.ts index 289583f..f98e1c0 100644 --- a/src/modules/garden/server/species-lookup.ts +++ b/src/modules/garden/server/species-lookup.ts @@ -75,12 +75,12 @@ export async function searchSpecies(query: string): Promise if (!token) return []; try { - const url = `${BASE_URL}/plant/search/?alias=${encodeURIComponent(query)}&limit=20`; + const url = `${BASE_URL}/plant/search?alias=${encodeURIComponent(query)}&limit=20`; const res = await fetch(url, { headers: { Authorization: `Bearer ${token}` }, cache: "no-store", }); - if (!res.ok) throw new Error(`OpenPlantBook search error: ${res.status}`); + if (!res.ok) throw new Error(`OpenPlantBook search error: ${res.status} ${res.url}`); const json = (await res.json()) as { results?: unknown[] }; if (!Array.isArray(json.results)) return []; @@ -116,7 +116,7 @@ export async function getSpeciesById(id: string): Promise