parent
a39cf75c7f
commit
7904151a52
|
@ -97,11 +97,8 @@ import Toastify from "toastify-js";
|
|||
let mail = ref("");
|
||||
let loading = ref(false);
|
||||
function login() {
|
||||
console.log("ihi");
|
||||
console.log(mail.value);
|
||||
loading.value = true;
|
||||
axios.get("").then((res) => {
|
||||
console.log(res.data);
|
||||
loading.value = false;
|
||||
Toastify({
|
||||
text: "This is a toast",
|
||||
|
|
|
@ -97,11 +97,8 @@ import Toastify from "toastify-js";
|
|||
let mail = ref("");
|
||||
let loading = ref(false);
|
||||
function login() {
|
||||
console.log("ihi");
|
||||
console.log(mail.value);
|
||||
loading.value = true;
|
||||
axios.get("").then((res) => {
|
||||
console.log(res.data);
|
||||
loading.value = false;
|
||||
Toastify({
|
||||
text: "This is a toast",
|
||||
|
|
|
@ -238,7 +238,6 @@ if (props.token) {
|
|||
props.token = atob(props.token);
|
||||
axios.get(`${config.baseurl}api/organizations/selfservice/${props.token}`)
|
||||
.then(({ data }) => {
|
||||
console.log(data);
|
||||
state.org_name = data.name;
|
||||
})
|
||||
.catch((error) => {
|
||||
|
@ -281,10 +280,13 @@ function login() {
|
|||
}
|
||||
}
|
||||
toast("registration in progress...");
|
||||
axios.post(`${config.baseurl}api/runners/register`, postdata)
|
||||
let url = `${config.baseurl}api/runners/register`;
|
||||
if (props.token) {
|
||||
url = `${config.baseurl}api/runners/register/${props.token}`
|
||||
}
|
||||
axios.post(url, postdata)
|
||||
.then(({ data }) => {
|
||||
const token = btoa(data.token);
|
||||
// const userid = JSON.parse(atob(token.split(".")[1])).id;
|
||||
location.replace("../profile/" + token)
|
||||
//
|
||||
toast.success("You have been registered!");
|
||||
|
|
Loading…
Reference in New Issue