Skip to content

Commit

Permalink
pls work
Browse files Browse the repository at this point in the history
  • Loading branch information
AmeerArsala committed Jun 6, 2024
1 parent 65835ae commit d409282
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions frontend/src/components/AuthForms/AuthRedirect.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,19 @@
function handleAuth() {
let realHref: string = href + "&redirect=false";
axios.get(realHref).then((response) => {
fetch(realHref, {
method: 'GET',
headers: {
//'Accept': "application/json",
},
mode: 'cors'
})
.then((response) => response.json()) // wow, this worked better than response.text(). fuck you JS!!!
.then((text: string) => {
console.log("DONE!")
console.log(response.data);
console.log(text);
const url: string = response.data;
const url: string = text;
// Add the data to a store
// get state first
Expand All @@ -33,7 +41,7 @@
}).catch((error) => {
console.log(error);
console.log("Error getting auth");
})
});
}
</script>

Expand Down

0 comments on commit d409282

Please sign in to comment.