Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ay0503 authored Nov 15, 2024
1 parent 5a48033 commit f70bc93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/translate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ const translatorApi = module.exports;

translatorApi.translate = async function (postData) {
// Edit the translator URL below
const TRANSLATOR_API = "https://nodebb-f24-translator.azurewebsites.net"
const TRANSLATOR_API = "https://translator-service-team-tbd-abh6bqaghsf4b8fz.eastus-01.azurewebsites.net"
const query = `?content=${postData.content}`;
const url = encodeURI(TRANSLATOR_API + '/' + query);
const response = await fetch(url);
const data = await response.json();
return [data["is_english"], data["translated_content"]]
}
}

0 comments on commit f70bc93

Please sign in to comment.