Skip to content

Commit

Permalink
hot fix change concept scheme id in path for special cases like hochs…
Browse files Browse the repository at this point in the history
…chulfachsystematik
  • Loading branch information
sroertgen committed Sep 8, 2023
1 parent e15c2fc commit 724b207
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const exportIndex = (index, conceptScheme, language) => {
const path = getFilePath(
(conceptScheme.id.endsWith("/")
? conceptScheme.id.slice(0, -1)
: conceptScheme.id) + `/cs/search/${language}/${key}`,
: conceptScheme.id) + `-cs/search/${language}/${key}`,
`json`
)
createData({
Expand Down
2 changes: 1 addition & 1 deletion src/templates/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const importIndex = async (
const path =
(conceptSchemeId.endsWith("/")
? conceptSchemeId.slice(0, -1)
: conceptSchemeId) + `/cs/search/${language}/${key}`
: conceptSchemeId) + `-cs/search/${language}/${key}`

data = await fetch(withPrefix(getFilePath(path, `json`)))
const jsonData = await data.json()
Expand Down
8 changes: 4 additions & 4 deletions test/mocks/mockFetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,28 +81,28 @@ export default async function mockFetch(url) {
json: async () => res,
}
}
case "/w3id.org/cs/search/de/prefLabel.cfg.json": {
case "/w3id.org-cs/search/de/prefLabel.cfg.json": {
return {
ok: true,
status: 200,
json: async () => cfg,
}
}
case "/w3id.org/cs/search/de/prefLabel.ctx.json": {
case "/w3id.org-cs/search/de/prefLabel.ctx.json": {
return {
ok: true,
status: 200,
json: async () => ctx,
}
}
case "/w3id.org/cs/search/de/prefLabel.map.json": {
case "/w3id.org-cs/search/de/prefLabel.map.json": {
return {
ok: true,
status: 200,
json: async () => map,
}
}
case "/w3id.org/cs/search/de/reg.json": {
case "/w3id.org-cs/search/de/reg.json": {
return {
ok: true,
status: 200,
Expand Down

0 comments on commit 724b207

Please sign in to comment.