Skip to content

Commit

Permalink
Merge pull request #30 from PRTIMES/feature/frontend-add-api
Browse files Browse the repository at this point in the history
/api/company/listをGETに変更
  • Loading branch information
kyoya0819 authored Aug 29, 2024
2 parents 13b61c7 + 2a1dff7 commit c01a4a8
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 c01a4a8

Please sign in to comment.