Compare commits

..

No commits in common. "e796f6dcaf73271aee62bb34de4453755f597084" and "9b62962758f8a73d669bca69b77f2c09a13c9e7a" have entirely different histories.

View File

@ -261,6 +261,8 @@ import isEmail from 'validator/es/lib/isEmail';
import isMobilePhone from 'validator/es/lib/isMobilePhone';
import isPostalCode from 'validator/es/lib/isPostalCode';
import { useToast } from "vue-toastification";
// import { router } from '../router';
import { i18n } from '../language';
const props = defineProps({
token: String
@ -318,16 +320,14 @@ function login() {
postdata.team = org_team.value;
}
toast("registration in progress...");
const browserlocale = ((navigator.languages && navigator.languages[0]) || '').substr(0, 2);
let url = `${config.baseurl}api/runners/register/?locale=${browserlocale}`;
let url = `${config.baseurl}api/runners/register`;
if (props.token) {
url = `${config.baseurl}api/runners/register/${props.token}/?locale=${browserlocale}`
url = `${config.baseurl}api/runners/register/${props.token}`
}
axios.post(url, postdata)
.then(({ data }) => {
const token = btoa(data.token);
// alert(token);
location.replace(`${config.baseurl_selfservice}profile/${token}`);
// router.push(`${config.baseurl_selfservice}/profile/${token}`);
})
.catch((error) => {
console.log(error);