From d8a0a2977183053852c90237c8e385585a271e00 Mon Sep 17 00:00:00 2001 From: Isahann Hanacleto Date: Tue, 7 May 2024 09:58:37 -0300 Subject: [PATCH] Hotfix v1.4.1 --- db.json | 14 ++++++-------- package-lock.json | 4 ++-- package.json | 2 +- src/app/about-window/about-window.component.html | 2 +- src/service/trivia.service.ts | 10 +++++----- 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/db.json b/db.json index c6dfaff..bb690b6 100644 --- a/db.json +++ b/db.json @@ -27,15 +27,13 @@ "response_code": 0, "results": [ { - "type": "multiple", - "difficulty": "medium", - "category": "Entertainment: Video Games", - "question": "Which one of the first four titles of the "Grand Theft Auto" franchise started the series of iconic image grid cover arts?", - "correct_answer": "Grand Theft Auto III", + "type": "Ym9vbGVhbg==", + "difficulty": "bWVkaXVt", + "category": "RW50ZXJ0YWlubWVudDogSmFwYW5lc2UgQW5pbWUgJiBNYW5nYQ==", + "question": "VGhlIGFuaW1hdGVkIGZpbG0gIlNwaXJpdGVkIEF3YXkiIHdvbiB0aGUgQWNhZGVteSBBd2FyZCBmb3IgQmVzdCBBbmltYXRlZCBGZWF0dXJlIGF0IHRoZSA3NXRoIEFjYWRlbXkgQXdhcmRzIGluIDIwMDMu", + "correct_answer": "VHJ1ZQ==", "incorrect_answers": [ - "Grand Theft Auto", - "Grand Theft Auto II", - "Grand Theft Auto Vice City" + "RmFsc2U=" ] } ] diff --git a/package-lock.json b/package-lock.json index 30ddc2d..817229a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "xpquiz.github.io", - "version": "1.4.0", + "version": "1.4.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "xpquiz.github.io", - "version": "1.4.0", + "version": "1.4.1", "dependencies": { "@angular/animations": "^16.1.0", "@angular/common": "^16.1.0", diff --git a/package.json b/package.json index d946add..0eed12e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xpquiz.github.io", - "version": "1.4.0", + "version": "1.4.1", "scripts": { "ng": "ng", "start": "ng serve", diff --git a/src/app/about-window/about-window.component.html b/src/app/about-window/about-window.component.html index 3513841..9bad214 100644 --- a/src/app/about-window/about-window.component.html +++ b/src/app/about-window/about-window.component.html @@ -1,7 +1,7 @@
- + diff --git a/src/service/trivia.service.ts b/src/service/trivia.service.ts index fbc46d8..91ed78f 100644 --- a/src/service/trivia.service.ts +++ b/src/service/trivia.service.ts @@ -61,7 +61,7 @@ export class TriviaService { } private async getQuestionsOpenTriviaDB(): Promise { - const url: string = `${environment.openTriviaDBUrl}?amount=${this.questionLimit}`; + const url: string = `${environment.openTriviaDBUrl}?amount=${this.questionLimit}&encode=base64`; const response: OpenTriviaDBResponse = await firstValueFrom( this.httpClient.get(url) @@ -69,10 +69,10 @@ export class TriviaService { return response.results.map(res => { return { - question: res.question, - correctAnswer: res.correct_answer, - incorrectAnswers: res.incorrect_answers, - difficulty: res.difficulty as 'easy' | 'medium' | 'hard', + question: atob(res.question), + correctAnswer: atob(res.correct_answer), + incorrectAnswers: res.incorrect_answers.map(r => atob(r)), + difficulty: atob(res.difficulty) as 'easy' | 'medium' | 'hard', isNiche: false, } });