Skip to content

Commit

Permalink
updating translate url
Browse files Browse the repository at this point in the history
  • Loading branch information
VeronicaPim authored Nov 16, 2024
1 parent 84a641c commit 172912b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/translate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const fetch = require('node-fetch');
const translatorApi = module.exports;

translatorApi.translate = async function (postData) {
// Edit the translator URL below
const TRANSLATOR_API = 'https://translatorteambluesleep.azurewebsites.net/';
const response = await fetch(`${TRANSLATOR_API}/?content=${postData.content}`);
const data = await response.json();
return [data.is_english, data.translated_content];
// Update the translator URL to the correct endpoint

Check failure on line 8 in src/translate/index.js

View workflow job for this annotation

GitHub Actions / lint-and-test / test

Expected indentation of 1 tab but found 4 spaces
const TRANSLATOR_API = 'https://bluesleep-ai.openai.azure.com/'; // Correct endpoint

Check failure on line 9 in src/translate/index.js

View workflow job for this annotation

GitHub Actions / lint-and-test / test

Expected indentation of 1 tab but found 4 spaces

Check failure on line 9 in src/translate/index.js

View workflow job for this annotation

GitHub Actions / lint-and-test / test

Multiple spaces found before '// Correct end...'
const response = await fetch(`${TRANSLATOR_API}/?content=${postData.content}`);

Check failure on line 10 in src/translate/index.js

View workflow job for this annotation

GitHub Actions / lint-and-test / test

Expected indentation of 1 tab but found 4 spaces
const data = await response.json();

Check failure on line 11 in src/translate/index.js

View workflow job for this annotation

GitHub Actions / lint-and-test / test

Expected indentation of 1 tab but found 4 spaces
return [data.is_english, data.translated_content];

Check failure on line 12 in src/translate/index.js

View workflow job for this annotation

GitHub Actions / lint-and-test / test

Expected indentation of 1 tab but found 4 spaces
};

0 comments on commit 172912b

Please sign in to comment.