pull/7498/head
tanhauhau 2 years ago
parent bc81291afc
commit 3e5846c7c5

@ -4,7 +4,7 @@
let photos = [];
onMount(async () => {
const res = await fetch(`https://jsonplaceholder.typicode.com/photos?_limit=20`);
const res = await fetch(`/tutorial/api/album`);
photos = await res.json();
});
</script>

@ -15,7 +15,7 @@ We'll add an `onMount` handler that loads some data over the network:
let photos = [];
onMount(async () => {
const res = await fetch(`https://jsonplaceholder.typicode.com/photos?_limit=20`);
const res = await fetch(`/tutorial/api/album`);
photos = await res.json();
});
</script>

Loading…
Cancel
Save