Skip to content

Commit

Permalink
Fix routes bug
Browse files Browse the repository at this point in the history
  • Loading branch information
briansimoni committed Nov 10, 2023
1 parent 8f100c3 commit 38c8e13
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,15 @@ async function getMatches(ctx: ApiContext) {
}
const { name, realm } = params.value;

const matches = await matchDetailsStore.list({
const result = await matchDetailsStore.list({
id: `${name}@${realm}`,
continuationToken: params.value.continuation_token,
});

ctx.body = matches;
ctx.body = {
matches: result.items,
continuation_token: result.continuationToken,
};
}

async function getCrawlerState(ctx: ApiContext) {
Expand Down Expand Up @@ -208,11 +211,11 @@ async function getDocs(ctx: ApiContext) {
}

router.get("/character", queryCharacterMetadata);
router.get("/character/:id", getCharacterMetadata);
router.get("/character/profile", getCharacterProfileData);
router.get("/character/stats", getCharacterStats);
router.get("/character/matches", getMatches);
router.get("/character/crawl-state", getCrawlerState);
router.get("/character/:id", getCharacterMetadata);
router.post("/crawl", crawl);
router.get("/docs", getDocs);

Expand Down

0 comments on commit 38c8e13

Please sign in to comment.