Merge pull request 'feature/32-registration-language' (#33) from feature/32-registration-language into dev
continuous-integration/drone/push Build was killed
Details
continuous-integration/drone/push Build was killed
Details
Reviewed-on: #33 close #32
This commit is contained in:
commit
e796f6dcaf
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue