Skip to content

Added GUI to add polls - #2

Open
felixdngrs wants to merge 1 commit into
manefrom
frontend
Open

felixdngrs wants to merge 1 commit into
manefrom
frontend

Conversation

@felixdngrs

Copy link
Copy Markdown
Collaborator

No description provided.

this.options.splice(index, 1);
},
submit() {
// Hier muss der Code zum Speichern der Umfrage implementiert werden

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More specifically: An Axios request to our endpoint.

Comment on lines +20 to +25
axios
.get('/polls') // Hier wird die GET-Anfrage an den Server gesendet
.then(response => {
this.polls = response.data; // Hier wird die Antwort in der Datenliste gespeichert
})
.catch(error => console.log(error));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better as async/await, otherwise a really good looking start!

Comment thread frontend/src/main.js
Comment on lines +4 to +6
import { library } from '@fortawesome/fontawesome-svg-core'
import { faHome, faTrash} from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in package.json and yarn.lock, just install it again with yarn add <package name>, and add those two files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants