Skip to content

Commit

Permalink
Add a type to choose type of classification in ESCO
Browse files Browse the repository at this point in the history
  • Loading branch information
robz72 committed Jan 25, 2023
1 parent 4b16b95 commit 2978457
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import StarBorderIcon from '@material-ui/icons/StarBorder';

const capitalize = s => (s && s[0].toUpperCase() + s.slice(1)) || '';

const fetchESCO = (apiUrl = 'https://ec.europa.eu/esco/api') => async ({ keyword, locale }) => {
const fetchESCO = (apiUrl = 'https://ec.europa.eu/esco/api', type = 'skill') => async ({ keyword, locale }) => {
const response = await fetch(
urlJoin(
apiUrl,
`suggest2?text=${encodeURIComponent(
keyword
)}&language=${locale}&type=skill&isInScheme=&facet=&offset=&limit=&full=&selectedVersion=&viewObsolete=`
)}&language=${locale}&type=${type}&isInScheme=&facet=&offset=&limit=&full=&selectedVersion=&viewObsolete=`
)
);
if (response.ok) {
Expand Down

0 comments on commit 2978457

Please sign in to comment.