aboutsummaryrefslogtreecommitdiff
path: root/ui/src/routes/list/+page.svelte
blob: c487068e146dafd17b83cd2762a5c49dd0eb7a7a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<script>

    
  let data = null;

  const req = fetch(`http://localhost:6130/api/v1/list`)
    .then((res) => res.json())
    .then(resData => data = resData);

</script>

{#if data}
<ul>
    {#each data as paste (paste.id)}
    <li>
        <a href="/view/{paste.id}">
        ID: {paste.id} ({paste.size} bytes)
    </a>
    </li>
    {/each}
</ul>
{/if}