Skip to content
Snippets Groups Projects
Commit 79d0501d authored by Torbjørn Antonsen's avatar Torbjørn Antonsen
Browse files

Merge branch 'backend-frontend-sync' into 'main'

fixed parsing issue

See merge request !36
parents 12f6b1e8 27e1e263
No related branches found
No related tags found
1 merge request!36fixed parsing issue
Pipeline #269417 passed
...@@ -43,11 +43,12 @@ export default { ...@@ -43,11 +43,12 @@ export default {
console.log('Fetching data for quiz: ', quizId); console.log('Fetching data for quiz: ', quizId);
try { try {
apiClient.get('/quiz/quiz/' + this.quizId).then(response => { apiClient.get('/quiz/quiz/' + this.quizId).then(response => {
console.log(response)
this.quizTitle = JSON.parse(response.data.title); this.quizTitle = JSON.parse(response.data.title);
this.questions = JSON.parse(JSON.stringify(response.data.questions)); this.questions = response.data.questions;
this.creatorId = JSON.parse(response.data.creatorId); this.creatorId = JSON.parse(response.data.creatorId);
this.category = JSON.parse(response.data.category); this.category = response.data.category;
this.difficulty = JSON.parse(response.data.difficulty); this.difficulty = response.data.difficulty;
}); });
} catch (error) { } catch (error) {
//TODO: proper error handling //TODO: proper error handling
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment