Skip to content

Commit

Permalink
feat: implement GetMasteryCompletionDataForLocation
Browse files Browse the repository at this point in the history
Closes #509
  • Loading branch information
AnthonyFuller committed Aug 18, 2024
1 parent f50f019 commit 11595ad
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/menuData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,8 @@ menuDataRouter.get(
true,
)

// TODO: Enqueue events to unlock PRO1

res.json({
template: getConfig("MissionRewardsTemplate", false),
data: {
Expand Down
18 changes: 18 additions & 0 deletions components/profileHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import {
ResolveGamerTagsBody,
} from "./types/gameSchemas"
import assert from "assert"
import { generateCompletionData } from "./contracts/dataGen"

const profileRouter = Router()

Expand Down Expand Up @@ -657,6 +658,23 @@ profileRouter.post(
},
)

profileRouter.post(
"/HubPagesService/GetMasteryCompletionDataForLocation",
jsonMiddleware(),
// @ts-expect-error Has jwt props.
(req: RequestWithJwt<{ locationId: string; difficulty: string }>, res) => {
res.json({
CompletionData: generateCompletionData(
req.body.locationId,
req.jwt.unique_name,
req.gameVersion,
undefined,
req.body.difficulty,
),
})
},
)

profileRouter.post(
"/DefaultLoadoutService/Set",
jsonMiddleware(),
Expand Down

0 comments on commit 11595ad

Please sign in to comment.