diff --git a/.prettierrc b/.prettierrc index 68913d0..8a088d1 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,7 +1,5 @@ { + "printWidth": 200, "tabWidth": 2, - "useTabs": false, - "printWidth": 150, - "semi": false, - "singleQuote": true -} \ No newline at end of file + "useTabs": false +} diff --git a/src/modules/translation/translate.controller.ts b/src/modules/translation/translate.controller.ts index 986491f..63ca3d1 100644 --- a/src/modules/translation/translate.controller.ts +++ b/src/modules/translation/translate.controller.ts @@ -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) diff --git a/src/modules/translation/translate.schema.ts b/src/modules/translation/translate.schema.ts index 6a342d1..41db2b5 100644 --- a/src/modules/translation/translate.schema.ts +++ b/src/modules/translation/translate.schema.ts @@ -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',