From b72e0c02c2a81ae06aad35c6f82dfcf31ebd7655 Mon Sep 17 00:00:00 2001 From: shakilurrehman21 Date: Thu, 26 Nov 2026 19:15:50 +0530 Subject: [PATCH] Fix JavaScript arrow function SyntaxError in REST API examples --- content/rest/quickstart.md | 2 +- .../using-the-rest-api/getting-started-with-the-rest-api.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/rest/quickstart.md b/content/rest/quickstart.md index 688bcdd08399..c3f1747753aa 100644 --- a/content/rest/quickstart.md +++ b/content/rest/quickstart.md @@ -189,7 +189,7 @@ try { repo: "{% ifversion ghes %}REPO-NAME{% else %}Spoon-Knife{% endif %}", }); - const titleAndAuthor = result.data.map(issue => {title: issue.title, authorID: issue.user.id}) + const titleAndAuthor = result.data.map(issue => ({ title: issue.title, authorID: issue.user.id })) console.log(titleAndAuthor) diff --git a/content/rest/using-the-rest-api/getting-started-with-the-rest-api.md b/content/rest/using-the-rest-api/getting-started-with-the-rest-api.md index 111973a7afcc..67b214ad07d0 100644 --- a/content/rest/using-the-rest-api/getting-started-with-the-rest-api.md +++ b/content/rest/using-the-rest-api/getting-started-with-the-rest-api.md @@ -624,7 +624,7 @@ try { per_page: 2, }); - const titleAndAuthor = result.data.map(issue => {title: issue.title, authorID: issue.user.id}) + const titleAndAuthor = result.data.map(issue => ({ title: issue.title, authorID: issue.user.id })) console.log(titleAndAuthor)