aboutsummaryrefslogtreecommitdiff
path: root/ui/src/routes/list/+page.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src/routes/list/+page.svelte')
-rw-r--r--ui/src/routes/list/+page.svelte22
1 files changed, 22 insertions, 0 deletions
diff --git a/ui/src/routes/list/+page.svelte b/ui/src/routes/list/+page.svelte
new file mode 100644
index 0000000..c487068
--- /dev/null
+++ b/ui/src/routes/list/+page.svelte
@@ -0,0 +1,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} \ No newline at end of file