Skip to content

Commit

Permalink
Another one
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-blomlof committed May 29, 2024
1 parent 9279f8d commit f44d279
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
18 changes: 6 additions & 12 deletions Frontend/src/routes/login/[token]/+page.server.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
export async function load({params }) {
const res = await fetch('https://api.tv.betasektionen.se/JwtToken/IssueNewToken/'+ params.token, {
/** @type {import('./$types').PageLoad} */
export async function load({ fetch, params }) {
const res = await fetch(`https://api.tv.betasektionen.se/JwtToken/IssueNewToken/${params.id}`, {
method: 'POST'
});

const body = await res.json();
return {
props: {
body: body
}

};
}
});
const item = await res.json();
return { item };}
4 changes: 2 additions & 2 deletions Frontend/src/routes/login/[token]/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script>
export let data;
console.log(data);
export let item;
console.log(item);
</script>

0 comments on commit f44d279

Please sign in to comment.