Skip to content

Commit 4548f87

Browse files
authored
fix(dictionary-api): change slug mapping from word.slug to word.id (#281)
## Description <!-- Please add PR description (don't leave blank) - example: This PR [adds/removes/fixes/replaces] the [feature/bug/etc] --> This pull request makes a small change to the API response format for the dictionary collection. The `slug` field in the response is now set to use the `id` property from the source data, instead of the previous `slug` property. ## Related Issue <!-- Please prefix the issue number with Fixes/Resolves - example: Fixes #123 or Resolves #123 --> - #251 - #257 ## Screenshots/Screencasts <!-- Please provide screenshots or video recording that demos your changes (especially if it's a visual change) --> NA ## Notes to Reviewer <!-- Please state here if you added a new npm packages, or any extra information that can help reviewer better review you changes --> NA
1 parent 673affc commit 4548f87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pages/api/v1/browse/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export async function GET() {
1212
const dictionary = await getCollection("dictionary");
1313
const response = dictionary.map((word) => {
1414
return {
15-
slug: word.slug,
15+
slug: word.id,
1616
title: word.data.title,
1717
content: word.body,
1818
};

0 commit comments

Comments
 (0)