Skip to content

Commit

Permalink
fix:translation error
Browse files Browse the repository at this point in the history
  • Loading branch information
aliosmandev committed Sep 9, 2023
1 parent 1abc8c7 commit f78ebc1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"printWidth": 200,
"tabWidth": 2,
"useTabs": false,
"printWidth": 150,
"semi": false,
"singleQuote": true
}
"useTabs": false
}
2 changes: 1 addition & 1 deletion src/modules/translation/translate.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function TextTranslate(
to: targetLanguage,
platform: "api"
}
if (sourceLanguage) translateOptions.from = sourceLanguage
if (sourceLanguage !== "detech") translateOptions.from = sourceLanguage

const {data} = await translateService.post("https://lingvanex-translate.p.rapidapi.com/translate", translateOptions)

Expand Down
4 changes: 2 additions & 2 deletions src/modules/translation/translate.schema.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { JSONSchema } from 'json-schema-to-ts'
import { tags } from '@/utils/constants/Tags'
import { JSONSchema } from 'json-schema-to-ts'

export const TranslationValidationBody = {
type: 'object',
properties: {
sourceLanguage: {
type: 'string',
default: 'en',
default:"detech"
},
targetLanguage: {
type: 'string',
Expand Down

0 comments on commit f78ebc1

Please sign in to comment.