From 1fb26ad31d385ddc628e1b73d6a8764981ca6885 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Sat, 5 Oct 2024 20:32:02 -0400
Subject: Use `/api/boot` to bootstrap the client.

The client now takes an initial snapshot from the response to `/api/boot`, then picks up the event stream at the immediately-successive event to the moment the snapshot was taken.

This commit removes the following unused endpoints:

* `/api/channels` (GET)
* `/api/channels/:channel/messages` (GET)

The information therein is now part of the boot response. We can always add 'em back, but I wanted to clear the deck for designing something more capable, for dealing with client needs.
---
 hi-ui/src/lib/ChannelList.svelte | 20 +++-----------------
 1 file changed, 3 insertions(+), 17 deletions(-)

(limited to 'hi-ui/src/lib/ChannelList.svelte')

diff --git a/hi-ui/src/lib/ChannelList.svelte b/hi-ui/src/lib/ChannelList.svelte
index 5577d94..ba48e5d 100644
--- a/hi-ui/src/lib/ChannelList.svelte
+++ b/hi-ui/src/lib/ChannelList.svelte
@@ -1,32 +1,18 @@
 <script>
-	import { onMount } from 'svelte';
-
-    import { listChannels } from '../apiServer';
     import { channelsList } from '../store';
     import Channel from './Channel.svelte';
 
     let channels;
-    let loading = true;
 
     channelsList.subscribe((value) => {
         channels = value.channels;
     });
-
-	onMount(async () => {
-        let channels = await listChannels();
-        channelsList.update((value) => value.setChannels(channels.data));
-        loading = false;
-    });
 </script>
 
 <ul class="select-none">
-    {#if loading}
-        <li><em>loading channels&hellip;</em></li>
-    {:else}
-        {#each channels as channel}
-            <Channel {...channel} />
-        {/each}
-    {/if}
+    {#each channels as channel}
+        <Channel {...channel} />
+    {/each}
 </ul>
 
 <style>
-- 
cgit v1.2.3

