0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00

Merge branch 'tanhauhau/gh-328'

This commit is contained in:
tanhauhau 2022-04-20 12:52:45 +08:00
commit 0a086c85e4
2 changed files with 2 additions and 2 deletions

View File

@ -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>

View File

@ -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>