This commit is contained in:
@@ -13,7 +13,7 @@ export default defineNuxtComponent({
|
||||
DeleteLocation,
|
||||
},
|
||||
data: () => ({
|
||||
apiBaseURL: 'http://10.1.1.2:8880',
|
||||
apiBaseURL: 'https://api-weather.argideli.com',
|
||||
apiURL: '',
|
||||
addModalOpen: false,
|
||||
addConfirmModalOpen: false,
|
||||
@@ -25,7 +25,6 @@ export default defineNuxtComponent({
|
||||
locID: null,
|
||||
locations: [],
|
||||
databaseLocations: [],
|
||||
|
||||
weatherData: [],
|
||||
weatherIcons: {
|
||||
1: [0],
|
||||
@@ -91,7 +90,9 @@ export default defineNuxtComponent({
|
||||
},
|
||||
|
||||
/**
|
||||
* A description of the entire function.
|
||||
* Calls the API to fetch weather data for the specified location.
|
||||
* a bulk parameter can be passed to fetch weather data for a list oflocations
|
||||
* or a single location.
|
||||
*
|
||||
* @param {type} bulk - description of parameter
|
||||
* @param {type} location - description of parameter
|
||||
|
||||
@@ -48,6 +48,13 @@ export default defineNuxtComponent({
|
||||
getWeatherIcon(wmoCode) {
|
||||
return utils.getWeatherIcon(wmoCode);
|
||||
},
|
||||
/**
|
||||
* Adds a new location based on the input provided.
|
||||
* if the location already exists in the database, it will not be added.
|
||||
*
|
||||
*
|
||||
* @param {Object} input - The input object containing location details.
|
||||
*/
|
||||
async addLocation(input) {
|
||||
this.apiURL = `${this.apiBaseURL}/locations`;
|
||||
if (input) {
|
||||
|
||||
Reference in New Issue
Block a user