PASSAGGIO A VITE !
AGG. 1.1.23
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { default as Axios, AxiosResponse } from 'axios'
|
||||
import type { AxiosResponse } from 'axios';
|
||||
import { default as Axios } from 'axios'
|
||||
// import { IPayload } from 'model'
|
||||
import { GlobalConfig, PayloadMessageTypes } from '../common'
|
||||
import { tools } from '../store/Modules/tools'
|
||||
@@ -7,7 +8,7 @@ import { helpers } from '@vuelidate/validators'
|
||||
const { withAsync } = helpers
|
||||
|
||||
// const SITE_URL = GlobalConfig.uri.site
|
||||
const VALIDATE_USER_URL = process.env.MONGODB_HOST + '/users/'
|
||||
const VALIDATE_USER_URL = import.meta.env.VITE_MONGODB_HOST + '/users/'
|
||||
|
||||
export const aportadorexist = withAsync(_aportadorexist)
|
||||
|
||||
@@ -20,7 +21,7 @@ export function _aportadorexist(userName: string) {
|
||||
return res.status === PayloadMessageTypes.statusfound
|
||||
}
|
||||
|
||||
return Axios.get(VALIDATE_USER_URL + process.env.APP_ID + '/' + userName)
|
||||
return Axios.get(VALIDATE_USER_URL + tools.getEnv('VITE_APP_ID') + '/' + userName)
|
||||
.then(onSuccess)
|
||||
.catch((err) => {
|
||||
// console.log('err', err)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Patterns } from '@/common'
|
||||
import { Patterns } from '@src/common'
|
||||
import { tools } from '../store/Modules/tools'
|
||||
|
||||
export function complexity(password: string) {
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { default as Axios, AxiosResponse } from 'axios'
|
||||
import type { AxiosResponse } from 'axios';
|
||||
import { default as Axios } from 'axios'
|
||||
import { GlobalConfig, PayloadMessageTypes } from '../common'
|
||||
|
||||
import { helpers } from '@vuelidate/validators'
|
||||
import { tools } from '@tools'
|
||||
const { withAsync } = helpers
|
||||
|
||||
// const SITE_URL = GlobalConfig.uri.site
|
||||
const VALIDATE_USER_URL = process.env.MONGODB_HOST + '/email/ck'
|
||||
const VALIDATE_USER_URL = import.meta.env.VITE_MONGODB_HOST + '/email/ck'
|
||||
|
||||
export const registeredemail = withAsync(_registeredemail)
|
||||
|
||||
@@ -15,7 +17,7 @@ export function _registeredemail(email: string) {
|
||||
return res.status !== PayloadMessageTypes.statusfound
|
||||
}
|
||||
|
||||
return Axios.post(VALIDATE_USER_URL, {idapp: process.env.APP_ID, email, key: process.env.PAO_APP_ID})
|
||||
return Axios.post(VALIDATE_USER_URL, { idapp: tools.getEnv('VITE_APP_ID'), email, key: import.meta.env.VITE_PAO_APP_ID })
|
||||
.then(onSuccess)
|
||||
.catch((err) => {
|
||||
return true
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
import { default as Axios, AxiosResponse } from 'axios'
|
||||
import type { AxiosResponse } from 'axios';
|
||||
import { default as Axios } from 'axios'
|
||||
// import { IPayload } from 'model'
|
||||
import { GlobalConfig, PayloadMessageTypes } from '../common'
|
||||
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { tools } from '@tools'
|
||||
|
||||
import { helpers } from '@vuelidate/validators'
|
||||
const { withAsync } = helpers
|
||||
|
||||
// const SITE_URL = GlobalConfig.uri.site
|
||||
const VALIDATE_USER_URL = process.env.MONGODB_HOST + '/users/'
|
||||
const VALIDATE_USER_URL = import.meta.env.VITE_MONGODB_HOST + '/users/'
|
||||
|
||||
export const registereduser = withAsync(_registereduser)
|
||||
|
||||
export function _registereduser (userName: string) {
|
||||
export function _registereduser(userName: string) {
|
||||
|
||||
const onSuccess = (res: AxiosResponse) => {
|
||||
return res.status !== PayloadMessageTypes.statusfound
|
||||
}
|
||||
|
||||
return Axios.get(VALIDATE_USER_URL + process.env.APP_ID + '/' + tools.rimuoviAtInizio(userName))
|
||||
return Axios.get(VALIDATE_USER_URL + tools.getEnv('VITE_APP_ID') + '/' + tools.rimuoviAtInizio(userName))
|
||||
.then(onSuccess)
|
||||
.catch((err) => {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user