style: Prettier format
This commit is contained in:
parent
b924590746
commit
7849dd0e4a
@ -7,18 +7,13 @@ async function createChannel(client: cassandra.Client, channelName: string) {
|
|||||||
message_content TEXT,
|
message_content TEXT,
|
||||||
timestamp TIMESTAMP,
|
timestamp TIMESTAMP,
|
||||||
sender UUID
|
sender UUID
|
||||||
);`)
|
);`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function storeMessage(
|
async function storeMessage(client: cassandra.Client, channelName: string, content: string, sender: string, id: string) {
|
||||||
client: cassandra.Client,
|
|
||||||
channelName: string,
|
|
||||||
content: string,
|
|
||||||
sender: string,
|
|
||||||
id: string) {
|
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
await client.execute(`INSERT INTO channels.channel_${channelName} (id, message_content, timestamp, sender)
|
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({
|
const client = new cassandra.Client({
|
||||||
|
Loading…
Reference in New Issue
Block a user