- Downline User

- Not registered if already exists.
- Forgot Password
This commit is contained in:
Paolo Arena
2020-01-30 01:20:56 +01:00
parent 1956e53d07
commit 4b54a9ce52
31 changed files with 793 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import { default as Axios, AxiosResponse } from 'axios'
// import { IPayload } from 'model'
import { GlobalConfig, PayloadMessageTypes } from '../common'
import { tools } from '../store/Modules/tools'
// const SITE_URL = GlobalConfig.uri.site
const VALIDATE_USER_URL = process.env.MONGODB_HOST + '/users/'
export function aportadorexist(userName: string) {
if (userName === tools.APORTADOR_NONE)
return true
let onSuccess = (res: AxiosResponse) => {
// console.log('res.status', res.status)
return res.status === PayloadMessageTypes.statusfound
}
return Axios.get(VALIDATE_USER_URL + process.env.APP_ID + '/' + userName)
.then(onSuccess)
.catch((err) => {
// console.log('err', err)
return false
})
}