|
|
@ -15,7 +15,7 @@ export const getReadme = async () => {
|
|
|
|
|
|
|
|
|
|
|
|
export const getWeather = async (city: string) => {
|
|
|
|
export const getWeather = async (city: string) => {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const { data } = await axios.get(`/api/weather/${city}`);
|
|
|
|
const { data } = await axios.get(`https://wttr.in/${city}?ATm`);
|
|
|
|
return data;
|
|
|
|
return data;
|
|
|
|
} catch (error) {
|
|
|
|
} catch (error) {
|
|
|
|
return error;
|
|
|
|
return error;
|
|
|
|