From de9e01e93228bee09896f2db739018d35cfbbb4e Mon Sep 17 00:00:00 2001 From: snxraven Date: Sat, 22 Jun 2024 21:19:28 +0000 Subject: [PATCH] revert 8c0f7ebd0fb1d00eccc16c283dcab498a1b58d5b revert test --- app.js | 26 +++++++------------------- index.html | 6 ++---- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/app.js b/app.js index b7e1383..d479cad 100644 --- a/app.js +++ b/app.js @@ -61,30 +61,18 @@ function updatePeerCount() { } } -async function processGuild(guildTopic) { - // Simulate fetching guild data for the given topic - const guildData = { - guildTopic, - guildAlias: "Sample Guild", - rooms: [ - { topic: "room1", alias: "Room 1" }, - { topic: "room2", alias: "Room 2" } - ], - owner: config.userName - }; - - config.guilds[guildData.guildTopic] = { - alias: guildData.guildAlias, - rooms: guildData.rooms, - owner: guildData.owner +async function processGuild(guildData) { + const parsedData = JSON.parse(guildData); + config.guilds[parsedData.guildTopic] = { + alias: parsedData.guildAlias, + rooms: parsedData.rooms, + owner: parsedData.owner }; writeConfigToFile("./config.json"); renderGuildList(); - await joinGuild(guildData.guildTopic); + await joinGuild(parsedData.guildTopic); } -export { processGuild }; - async function joinGuild(guildTopic) { const guild = config.guilds[guildTopic]; if (guild) { diff --git a/index.html b/index.html index 51f79ce..8f539cb 100644 --- a/index.html +++ b/index.html @@ -103,9 +103,7 @@ - - + \ No newline at end of file