first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-05-06 10:14:26 -04:00
commit 2692a07db8
10 changed files with 1553 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
import axios from "axios";
import dotenv from "dotenv"
export const fetch = async (req, res)=>{
try{
let config = {
headers: {
'Authorization': 'Bearer ' + `${process.env.VERIFY_ME_PUBLIC_TEST_SECRET}`,
'Content-Type': 'application/json'
}
};
const bodyParameters = {
"firstname":"John",
"lastname":"Doe",
"dob":"04-04-1944"
};
axios.post(
`${process.env.VERIFY_ME_ENDPOINT}/10000000001`,
bodyParameters
,
config
)
.then( ( response ) => {
return res.json({res : response.data});
//console.log( response )
} )
.catch()
}catch(error){
res.status(500).json({error: "Internal Server error"});
}
}