diff --git a/src/handbook/src/backend/server.ts b/src/handbook/src/backend/server.ts index 9ab279a7f..de3850c14 100644 --- a/src/handbook/src/backend/server.ts +++ b/src/handbook/src/backend/server.ts @@ -30,8 +30,10 @@ function invalid(value: number): boolean { * @param talents The level for the avatar's talents. */ export async function grantAvatar( - avatar: number, level = 90, - constellations = 6, talents = 6 + avatar: number, + level = 90, + constellations = 6, + talents = 6 ): Promise { // Validate the numbers. if (invalid(avatar) || invalid(level) @@ -39,12 +41,15 @@ export async function grantAvatar( return { status: -1, message: "Invalid arguments." }; return await fetch(`https://localhost:443/handbook/avatar`, { - method: "POST", body: JSON.stringify({ + method: "POST", + body: JSON.stringify({ player: targetPlayer.toString(), avatar: avatar.toString(), - level, constellations, talentLevels: talents + level, + constellations, + talentLevels: talents }) - }).then(res => res.json()); + }).then((res) => res.json()); } /** diff --git a/src/handbook/src/backend/types.ts b/src/handbook/src/backend/types.ts index deb6a4c04..857f1aebb 100644 --- a/src/handbook/src/backend/types.ts +++ b/src/handbook/src/backend/types.ts @@ -121,7 +121,7 @@ export enum ItemCategory { export type CommandResponse = { status: number | 200 | 500; message: string; -} +}; /** * Checks if a string is a page. diff --git a/src/handbook/src/ui/pages/AvatarsPage.tsx b/src/handbook/src/ui/pages/AvatarsPage.tsx index c51b99f8a..fe97e3a6d 100644 --- a/src/handbook/src/ui/pages/AvatarsPage.tsx +++ b/src/handbook/src/ui/pages/AvatarsPage.tsx @@ -26,11 +26,9 @@ class AvatarsPage extends React.PureComponent {
{listAvatars().map((avatar) => - avatar.id > 11000000 ? undefined : - + avatar.id > 11000000 ? undefined : ( + + ) )}