Skip to content

Commit

Permalink
/api/company/listをGETに変更
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoya0819 committed Aug 29, 2024
1 parent 985a844 commit 2a1dff7
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions frontend/src/pages/customize/company.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand Down

0 comments on commit 2a1dff7

Please sign in to comment.