Skip to content

Commit 8a66df9

Browse files
authored
Merge pull request #60 from xpquiz/develop
Hotfix v1.4.1
2 parents c4ae4d8 + d8a0a29 commit 8a66df9

File tree

5 files changed

+15
-17
lines changed

5 files changed

+15
-17
lines changed

db.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,13 @@
2727
"response_code": 0,
2828
"results": [
2929
{
30-
"type": "multiple",
31-
"difficulty": "medium",
32-
"category": "Entertainment: Video Games",
33-
"question": "Which one of the first four titles of the "Grand Theft Auto" franchise started the series of iconic image grid cover arts?",
34-
"correct_answer": "Grand Theft Auto III",
30+
"type": "Ym9vbGVhbg==",
31+
"difficulty": "bWVkaXVt",
32+
"category": "RW50ZXJ0YWlubWVudDogSmFwYW5lc2UgQW5pbWUgJiBNYW5nYQ==",
33+
"question": "VGhlIGFuaW1hdGVkIGZpbG0gIlNwaXJpdGVkIEF3YXkiIHdvbiB0aGUgQWNhZGVteSBBd2FyZCBmb3IgQmVzdCBBbmltYXRlZCBGZWF0dXJlIGF0IHRoZSA3NXRoIEFjYWRlbXkgQXdhcmRzIGluIDIwMDMu",
34+
"correct_answer": "VHJ1ZQ==",
3535
"incorrect_answers": [
36-
"Grand Theft Auto",
37-
"Grand Theft Auto II",
38-
"Grand Theft Auto Vice City"
36+
"RmFsc2U="
3937
]
4038
}
4139
]

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xpquiz.github.io",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",

src/app/about-window/about-window.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="window">
22
<app-window-title-bar iconPath="about.png" title="About XPQuiz"></app-window-title-bar>
33
<div class="window-body">
4-
<label><b>XPQuiz</b>&nbsp;- Version 1.4.0</label>
4+
<label><b>XPQuiz</b>&nbsp;- Version 1.4.1</label>
55
<label class="main">Created by&nbsp;<b><a href="https://isahann.github.io">Isahann Hanacleto</a></b></label>
66

77
<label>Source code at&nbsp;<b><a href="https://github.com/xpquiz/xpquiz.github.io">GitHub</a></b></label>

src/service/trivia.service.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,18 @@ export class TriviaService {
6161
}
6262

6363
private async getQuestionsOpenTriviaDB(): Promise<Question[]> {
64-
const url: string = `${environment.openTriviaDBUrl}?amount=${this.questionLimit}`;
64+
const url: string = `${environment.openTriviaDBUrl}?amount=${this.questionLimit}&encode=base64`;
6565

6666
const response: OpenTriviaDBResponse = await firstValueFrom(
6767
this.httpClient.get<OpenTriviaDBResponse>(url)
6868
);
6969

7070
return response.results.map(res => {
7171
return {
72-
question: res.question,
73-
correctAnswer: res.correct_answer,
74-
incorrectAnswers: res.incorrect_answers,
75-
difficulty: res.difficulty as 'easy' | 'medium' | 'hard',
72+
question: atob(res.question),
73+
correctAnswer: atob(res.correct_answer),
74+
incorrectAnswers: res.incorrect_answers.map(r => atob(r)),
75+
difficulty: atob(res.difficulty) as 'easy' | 'medium' | 'hard',
7676
isNiche: false,
7777
}
7878
});

0 commit comments

Comments
 (0)