Skip to content

Commit

Permalink
change fallback title for German instance
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasHuber committed Jul 3, 2024
1 parent 9542b53 commit 2a51248
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/server/src/schema/uuid/abstract-uuid/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,15 @@ async function resolveUuidFromDatabase(
)
: null
const subjectName = subject ? toSlug(subject.name) : 'serlo'
const slugTitle = toSlug(baseUuid.entityTitle ?? baseUuid.entityType)

let fallbackTitle: string = baseUuid.entityType
if (baseUuid.entityInstance === 'de') {

Check failure on line 384 in packages/server/src/schema/uuid/abstract-uuid/resolvers.ts

View workflow job for this annotation

GitHub Actions / eslint

The two values in this comparison do not have a shared enum type
if (fallbackTitle === 'text-exercise') fallbackTitle = 'aufgabe'
else if (fallbackTitle === 'text-exercise-group') fallbackTitle = 'aufgabengruppe'
}

const slugTitle = toSlug(baseUuid.entityTitle ?? fallbackTitle)

const entity = {
...base,
instance: baseUuid.entityInstance,
Expand Down

0 comments on commit 2a51248

Please sign in to comment.