sync - 0.4.5 #34

Merged
philipp merged 23 commits from dev into main 2021-04-01 16:46:07 +00:00
1 changed files with 5 additions and 5 deletions
Showing only changes of commit e796f6dcaf - Show all commits

View File

@ -261,8 +261,6 @@ 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
@ -320,14 +318,16 @@ function login() {
postdata.team = org_team.value;
}
toast("registration in progress...");
let url = `${config.baseurl}api/runners/register`;
const browserlocale = ((navigator.languages && navigator.languages[0]) || '').substr(0, 2);
let url = `${config.baseurl}api/runners/register/?locale=${browserlocale}`;
if (props.token) {
url = `${config.baseurl}api/runners/register/${props.token}`
url = `${config.baseurl}api/runners/register/${props.token}/?locale=${browserlocale}`
}
axios.post(url, postdata)
.then(({ data }) => {
const token = btoa(data.token);
// router.push(`${config.baseurl_selfservice}/profile/${token}`);
// alert(token);
location.replace(`${config.baseurl_selfservice}profile/${token}`);
})
.catch((error) => {
console.log(error);