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