diff --git a/worker/src/3-openai.ts b/worker/src/3-openai.ts index 516d66c..7354687 100644 --- a/worker/src/3-openai.ts +++ b/worker/src/3-openai.ts @@ -6,7 +6,6 @@ import { generateTranslation, textIsRelatedToSweden, } from './utils/openai'; -import { LanguageEnum } from './utils/kysely-types'; import { translate } from './utils/helpers'; (async () => { @@ -144,7 +143,7 @@ import { translate } from './utils/helpers'; .insertInto('articleTranslations') .values({ articleId: article.id, - language: language as LanguageEnum, + language: language, title: headlineTranslated, slug: slugify(headlineTranslated, { lower: true, diff --git a/worker/src/tmp-backfill-translations.ts b/worker/src/tmp-backfill-translations.ts index fbc87ad..536a7bb 100644 --- a/worker/src/tmp-backfill-translations.ts +++ b/worker/src/tmp-backfill-translations.ts @@ -1,7 +1,6 @@ import slugify from 'slugify'; import { db } from './utils/db'; import { translate } from './utils/helpers'; -import { LanguageEnum } from './utils/kysely-types'; async function main() { // get all articles that are not yet translated @@ -74,7 +73,7 @@ async function main() { .insertInto('articleTranslations') .values({ articleId: id, - language: language as LanguageEnum, + language: language, title: headlineTranslated, slug: slugify(headlineTranslated, { lower: true,