weather url fix
All checks were successful
release-tag / release-image (push) Successful in 44s

This commit is contained in:
Иван Антонович Козлов 2025-05-28 17:37:06 +03:00
parent f9ca0bdbd9
commit 13375abf24
4 changed files with 598 additions and 11 deletions

10
.env
View File

@ -1,4 +1,6 @@
# VUE_APP_API_URL=http://31.129.106.67:8080
# VUE_APP_GEO_URL=http://31.129.106.67:6001
VUE_APP_API_URL=http://127.0.0.1:8080
VUE_APP_GEO_URL=http://127.0.0.1:6001
VUE_APP_API_URL=http://31.129.106.67:8080
VUE_APP_GEO_URL=http://31.129.106.67:6001
VUE_APP_WEATHER_URL=http://31.129.106.67:6002
# VUE_APP_API_URL=http://127.0.0.1:8080
# VUE_APP_GEO_URL=http://127.0.0.1:6001
# VUE_APP_WEATHER_URL=http://127.0.0.1:6002

File diff suppressed because one or more lines are too long

View File

@ -72,7 +72,7 @@
<script>
import "../assets/style/main.css";
import { API_URL } from "../config";
import { API_URL, WEATHER_URL } from "../config";
import axios from "axios";
import clearIcon from "@/icons/clear-day.svg";
@ -189,12 +189,9 @@ export default {
async fetchWeatherData() {
console.log("Fetching weather data...");
const now = new Date();
const response = await axios.post(
"https://weather.wn.krbl.ru/v1/weather",
{
const response = await axios.post(`${WEATHER_URL}/v1/weather`, {
coordinates: { latitude: 59.938784, longitude: 30.314997 },
}
);
});
this.currentWeather = {
...response.data.currentWeather,
temperatureCelsius: Math.round(

View File

@ -1,2 +1,3 @@
export const API_URL = process.env.VUE_APP_API_URL;
export const GEO_URL = process.env.VUE_APP_GEO_URL;
export const WEATHER_URL = process.env.VUE_APP_WEATHER_URL;