Skip to content

Commit

Permalink
type updates
Browse files Browse the repository at this point in the history
  • Loading branch information
elitan committed Nov 6, 2023
1 parent b40783e commit f1240bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions worker/src/3-openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
generateTranslation,
textIsRelatedToSweden,
} from './utils/openai';
import { LanguageEnum } from './utils/kysely-types';
import { translate } from './utils/helpers';

(async () => {
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions worker/src/tmp-backfill-translations.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit f1240bb

Please sign in to comment.