verify model
This commit is contained in:
@@ -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 )
|
||||
} )
|
||||
|
||||
Reference in New Issue
Block a user