Skip to content

Commit

Permalink
API 호출 쿼리 변경(#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Db0111 committed Aug 25, 2024
1 parent 67b1664 commit f637556
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/service/weather.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ export async function getWeather(): Promise<WeatherResponse> {
const res = await fetch(
`${
import.meta.env.VITE_SERVER_URL
}/weather/forecast?now=${now}&nx=60&ny=127`
//Todo: StartDateTime과 EndDateTime Timeselector로 받아오기
}/weather/forecast?nowDateTime=${now}&startDateTime=2024-08-26T00:00:00&endDateTime=2024-08-26T08:00:00&nx=60&ny=127`
);
const json = await res.json();
console.log(json);

if (!res.ok) {
throw new Error(`${json.code}: ${json.message}`);
Expand Down

0 comments on commit f637556

Please sign in to comment.