Skip to content

Commit

Permalink
NOTTO_Esign_issue_on_NHA : API end point changes for fetching redirec…
Browse files Browse the repository at this point in the history
…t URL
  • Loading branch information
sreejith.k committed Jul 26, 2023
1 parent 4cbf3eb commit 18152d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion backend/donor-service/configs/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const INVITE_TEMPLATE_ID = process.env.INVITE_TEMPLATE_ID;
const NOTIFY_TEMPLATE_ID = process.env.NOTIFY_TEMPLATE_ID;
const UPDATE_TEMPLATE_ID = process.env.UPDATE_TEMPLATE_ID;
const UNPLEDGE_TEMPLATE_ID = process.env.UNPLEDGE_TEMPLATE_ID;
const API_KEY = process.env.API_KEY;
module.exports = {
REDIS_URL,
BASE_URL,
Expand All @@ -46,5 +47,6 @@ module.exports = {
NOTIFY_TEMPLATE_ID,
ABHA_CLIENT_URL,
UPDATE_TEMPLATE_ID,
UNPLEDGE_TEMPLATE_ID
UNPLEDGE_TEMPLATE_ID,
API_KEY
}
11 changes: 7 additions & 4 deletions backend/donor-service/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,13 +408,16 @@ const getEsignData = async(pledge) => {
"sorder": 0
}
})

const apiResponse = await axios({
let apiKey = config.API_KEY
const apiResponse = await axios.request({
method: 'post',
url: config.ESIGN_ESP_URL,
maxBodyLength: Infinity,
headers: {
'Content-Type': 'application/json'
},
'Content-Type': 'application/json',
'apikey': `${apiKey}`

},
data: data,
httpsAgent: new https.Agent({
rejectUnauthorized: false
Expand Down

0 comments on commit 18152d8

Please sign in to comment.