From 2a1dff774dfdcffa75a5aede1e187d358b1afdef Mon Sep 17 00:00:00 2001 From: kyoya0819 Date: Fri, 30 Aug 2024 06:50:31 +0900 Subject: [PATCH] =?UTF-8?q?/api/company/list=E3=82=92GET=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/customize/company.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/frontend/src/pages/customize/company.tsx b/frontend/src/pages/customize/company.tsx index 595ea1c..6263ca2 100644 --- a/frontend/src/pages/customize/company.tsx +++ b/frontend/src/pages/customize/company.tsx @@ -32,14 +32,17 @@ export default function CompanyList() { return } - const industry_ids = ( - Array.isArray(raw_industry_id) ? raw_industry_id : [raw_industry_id] - ).map((v) => Number(v)) + const industry_ids = Array.isArray(raw_industry_id) + ? raw_industry_id + : [raw_industry_id] - ky.post('./api/company/list', { - json: { - industry_ids, - }, + const searchParams = new URLSearchParams() + industry_ids.forEach((industry_id) => { + searchParams.append('industry_ids[]', industry_id) + }) + + ky.get('./api/company/list', { + searchParams, }) .then((v) => { return v.json<