diff --git a/src/lib/server/db/index.ts b/src/lib/server/db/index.ts index 294f7a9..25676fc 100644 --- a/src/lib/server/db/index.ts +++ b/src/lib/server/db/index.ts @@ -34,7 +34,6 @@ async function getMessages(client: cassandra.Client, channelName: string, limit: // to be specified by EQ or IN when using ORDER BY res.rows.sort((a, b) => a.timestamp - b.timestamp); - // For the same reason as above, we have to apply the limit manually // as well, because if we only query 5, but they're not properly sorted, // it will only return the first 5 instead of the last 5 diff --git a/src/routes/+page.server.ts b/src/routes/+page.server.ts index 6834c35..2a147dc 100644 --- a/src/routes/+page.server.ts +++ b/src/routes/+page.server.ts @@ -6,7 +6,11 @@ export const load: PageLoad = async () => { const rows = await getMessages(client, '000', 5); const messages: TypeMessage[] = rows ? rows.map((value) => { - return { message: value.message_content, user: value.sender.toString(), imageSrc: `https://api.dicebear.com/9.x/identicon/svg?seed=${value.sender.toString()}` }; + return { + message: value.message_content, + user: value.sender.toString(), + imageSrc: `https://api.dicebear.com/9.x/identicon/svg?seed=${value.sender.toString()}`, + }; }) : []; return { diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 387e9a4..9c6afc1 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -56,6 +56,6 @@
- +