From ff33c0b2d700dbf372c343e4d2dccc53970e6924 Mon Sep 17 00:00:00 2001 From: Yasuaki Uechi Date: Sun, 1 Sep 2019 01:31:16 +0900 Subject: [PATCH] fix: limit nta result --- api/services/nta.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/api/services/nta.ts b/api/services/nta.ts index 4d2a4b5..36c7884 100644 --- a/api/services/nta.ts +++ b/api/services/nta.ts @@ -72,7 +72,6 @@ export default async function handler( modifiedSection: entry[3], } }) - console.log(header) send(res, { meta: { @@ -82,11 +81,13 @@ export default async function handler( pages: parseInt(header[3]), }, result: - result.map((entry) => ({ - name: entry.name, - phoneticName: entry.phoneticName, - englishName: entry.englishName, - })) || [], + result + .map((entry) => ({ + name: entry.name, + phoneticName: entry.phoneticName, + englishName: entry.englishName, + })) + .slice(10) || [], }) } catch (err) { sendError(res, err)