Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // return form request api
- checkLOA = async (id) => {
- return new Promise((resolve,reject) => {
- const url = process.env.MIX_BACKEND_IP;
- axios.get(`${url}/api/loa_level/${id}`)
- .then((res) => {
- resolve(res.data.data.loa_level);
- })
- .catch((err) => {
- reject(err);
- });
- });
- }
- activateMobile = async (id) => {
- let a;
- try {
- a = await this.checkLOA(this.props.accountInfo.account.id);
- } catch (e) {
- console.log(e)
- a = -1 ;
- }
- if (a >= 1) {
- this.setState({
- mobileId: id,
- openModalConfirmMobile: true,
- });
- } else {
- this.props.dispatch(error({
- title: 'Data not complete.',
- message: 'Please fill in the data and confirming the e-mail before do this.',
- }));
- }
- };
- /*****************************************************************/
- //with error header
- let url = "http://203.154.100.147/api/checkbusiness_owner/"+id_card_value;
- axios.get(url,{
- headers:{Authorization:"Bearer "+accessToken}
- })
- .then(function (response) {
- console.log(response['data']);
- })
- .catch(function (error) {
- console.log(error);
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement