From 7849dd0e4a78859c72fa92128ea2f27701887482 Mon Sep 17 00:00:00 2001 From: April Hall Date: Thu, 9 Jan 2025 10:18:43 -0500 Subject: [PATCH] style: Prettier format --- src/lib/server/db/index.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/lib/server/db/index.ts b/src/lib/server/db/index.ts index a355a15..089130a 100644 --- a/src/lib/server/db/index.ts +++ b/src/lib/server/db/index.ts @@ -7,18 +7,13 @@ async function createChannel(client: cassandra.Client, channelName: string) { message_content TEXT, timestamp TIMESTAMP, sender UUID - );`) + );`); } -async function storeMessage( - client: cassandra.Client, - channelName: string, - content: string, - sender: string, - id: string) { +async function storeMessage(client: cassandra.Client, channelName: string, content: string, sender: string, id: string) { const now = new Date(); await client.execute(`INSERT INTO channels.channel_${channelName} (id, message_content, timestamp, sender) - VALUES (${id}, '${content}', ${now.getTime()}, ${sender})`) + VALUES (${id}, '${content}', ${now.getTime()}, ${sender})`); } const client = new cassandra.Client({ @@ -32,4 +27,4 @@ await client.connect(); await client.execute(`CREATE KEYSPACE IF NOT EXISTS users WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor': 1};`); await client.execute(`CREATE KEYSPACE IF NOT EXISTS channels WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor': 1};`); -export { client, createChannel, storeMessage }; \ No newline at end of file +export { client, createChannel, storeMessage };