Merge remote-tracking branch 'origin' into eric_front_and_back

This commit is contained in:
Me
2022-12-07 20:47:34 +01:00
8 changed files with 72 additions and 59 deletions

View File

@@ -31,7 +31,7 @@
})()
const submitCode = async() => {
const response = await fetch("http://transcendance:8080/api/v2/auth/2fa/turn-on",
const response = await fetch("http://transcendance:8080/api/v2/auth/2fa/check",
{
method : 'POST',
headers : {
@@ -47,7 +47,7 @@
}
if (response.status === 200) {
push('/profile');
console.log('vaid Code for 2FA')
console.log('valid Code for 2FA')
}
};
@@ -102,4 +102,4 @@
font-size: 0.8em;
color: red;
}
</style>
</style>

View File

@@ -17,7 +17,7 @@
onMount( async() => {
user = await fetch('http://transcendance:8080/api/v2/user')
.then( (x) => x.json() );
// do a .catch?
// do a .catch?
if (user === undefined) {
console.log('User did not load, something more official should prolly happen')
@@ -80,7 +80,6 @@
.then(response => response.json())
// .then((result) => console.log(result))
// .then(() => console.log('successful sub of new settings'))
.then(() => push('/profile'));
}
};
@@ -206,4 +205,4 @@
}
</style>
</style>