Skip to content

Commit

Permalink
Update api.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikvirendrar authored Nov 28, 2023
1 parent 95ebc61 commit 9bf9973
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/api.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const API_URL = "//xlit-api.ai4bharat.org";
const LANGS_API = API_URL + "/languages";
const LEARN_API = API_URL + "/learn";
const TRANSLITERATE_API = config.API_URL;
const TRANSLITERATE_API = process.env.API_URL;

async function getTransliterationSuggestions(lang, searchTerm) {

Expand Down Expand Up @@ -38,7 +38,7 @@ async function getTransliterationSuggestions(lang, searchTerm) {
mode: 'cors',
headers: new Headers({
'Content-Type': 'application/json',
'Authorization': config.API_KEY
'Authorization': process.env.API_KEY
})
})
.then(response => response.json());
Expand Down Expand Up @@ -74,7 +74,7 @@ async function getTransliterationForWholeText(inputLang, outputLang, text) {
mode: 'cors',
headers: new Headers({
'Content-Type': 'application/json',
'Authorization': config.API_KEY
'Authorization': process.env.API_KEY
})
})
.then(response => response.json());
Expand Down

0 comments on commit 9bf9973

Please sign in to comment.