Skip to content

Commit 2a9737d

Browse files
authored
Merge pull request #450 from rabbitholegg/mmackz/update-quest-endpoint
fix(questdk): update endpoint for fetching boosts
2 parents 0671aed + 08dd168 commit 2a9737d

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.changeset/calm-guests-eat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rabbitholegg/questdk": minor
3+
---
4+
5+
update endpoint for fetching boosts

apps/questdk/src/quests/fetchQuestData.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ describe('fetchQuestActionParams', () => {
4949
actionParams: {} as any, // Fill with correct test data
5050
}
5151
mock
52-
.onGet(`https://api.rabbithole.gg/v1.2/quest/public/${TEST_UUID}`)
52+
.onGet(`https://api.rabbithole.gg/quests/${TEST_UUID}?isPublic=true`)
5353
.reply(200, mockResponse)
5454

5555
const result = await fetchQuestByUUID(TEST_UUID)
@@ -59,7 +59,7 @@ describe('fetchQuestActionParams', () => {
5959

6060
test('should throw an error when the request fails', async () => {
6161
mock
62-
.onGet(`https://api.rabbithole.gg/v1.2/quest/public/${TEST_UUID}`)
62+
.onGet(`https://api.rabbithole.gg/quests/${TEST_UUID}?isPublic=true`)
6363
.reply(500)
6464
await expect(fetchQuestByUUID(TEST_UUID)).rejects.toThrow(
6565
'Failed to fetch quest data',

apps/questdk/src/quests/fetchQuestData.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ export async function fetchQuestActionParams(
1818
}
1919

2020
export async function fetchQuestByUUID(uuid: string): Promise<QuestDetails> {
21-
const endpoint = `https://api.rabbithole.gg/v1.2/quest/public/${uuid}`
22-
console.log('Fetching quest data from:', endpoint)
21+
const endpoint = `https://api.rabbithole.gg/quests/${uuid}?isPublic=true`
2322
try {
2423
const response = await axios.get(endpoint, {
2524
headers: {

0 commit comments

Comments
 (0)