verify model

This commit is contained in:
CHIEFSOFT\ameye
2024-05-06 12:58:41 -04:00
parent 5d3d35f915
commit e14fc3caa3
2 changed files with 61 additions and 2 deletions
+14 -2
View File
@@ -1,6 +1,6 @@
import axios from "axios";
import dotenv from "dotenv"
import Bvn from "../model/bvnModel.js";
export const fetch = async (req, res)=>{
try{
@@ -24,7 +24,19 @@ export const fetch = async (req, res)=>{
,
config
)
.then( ( response ) => {
.then( async ( response ) => {
//console.log(response.data.data);
//console.log("===============================================");
const bvnData = new Bvn(response.data.data);
const saveBvn = await bvnData.save();
console.log("===============================================");
console.log(saveBvn._id);
console.log("===============================================");
if ( response.data.status === "success"){
}
return res.json({res : response.data});
//console.log( response )
} )