

export async function fetchSilverPrice({ city, date }) {
  const res = await fetch(`/api/metal-rates/silver?city=${city}&date=${date}`);
  if (!res.ok) throw new Error("Silver price fetch failed");
  return res.json();
}

export async function fetchGoldPrice({ city, date }) {
  const res = await fetch(`/api/metal-rates/gold?city=${city}&date=${date}`);
  if (!res.ok) throw new Error("Gold price fetch failed");
  return res.json();
}
