0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-11-30 00:46:29 +01:00

use own api to replace jsonplaceholder.typicode.com (#7472)

This commit is contained in:
Tan Li Hau 2022-04-20 12:48:55 +08:00 committed by GitHub
parent d554cdbb25
commit 666929a6d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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>