Skip to content

Commit af41b24

Browse files
authored
Merge pull request #6 from workadventure/fix_xp
fix: Fixing XP not correctly sent in levelUp
2 parents 5d4c66d + aa95a0c commit af41b24

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,11 @@ export async function levelUp(questKey: string, xp: number): Promise<LevelUpResp
8282
const response = await fetch(url, {
8383
method: "POST",
8484
headers: {
85+
"Accept": "application/json",
8586
"Content-Type": "application/json",
8687
Authorization: getUserRoomToken(),
87-
body: JSON.stringify({ xp, room: WA.room.id }),
8888
},
89+
body: JSON.stringify({ xp }),
8990
});
9091
if (!response.ok) {
9192
throw new Error(`An error occurred. HTTP Code: ${response.status} ${response.statusText}.`);

0 commit comments

Comments
 (0)