Backend-Adresse aus .env file beziehen
This commit is contained in:
@@ -65,11 +65,11 @@ export default {
|
||||
async fetchData() {
|
||||
try {
|
||||
const [eventResponse, institutionResponse, eventPlaceResponse, contactPersonResponse, eventTypeResponse] = await Promise.all([
|
||||
axios.get('http://localhost:3000/api/events'),
|
||||
axios.get('http://localhost:3000/api/institutions'),
|
||||
axios.get('http://localhost:3000/api/event-places'),
|
||||
axios.get('http://localhost:3000/api/contact-persons'),
|
||||
axios.get('http://localhost:3000/api/event-types')
|
||||
axios.get('/events'),
|
||||
axios.get('/institutions'),
|
||||
axios.get('/event-places'),
|
||||
axios.get('/contact-persons'),
|
||||
axios.get('/event-types')
|
||||
]);
|
||||
|
||||
this.events = eventResponse.data;
|
||||
@@ -91,7 +91,7 @@ export default {
|
||||
},
|
||||
async deleteEvent(id) {
|
||||
try {
|
||||
await axios.delete(`http://localhost:3000/api/events/${id}`);
|
||||
await axios.delete(`/events/${id}`);
|
||||
this.fetchData();
|
||||
} catch (error) {
|
||||
console.error('Fehler beim Löschen der Veranstaltung:', error);
|
||||
|
||||
Reference in New Issue
Block a user