api key now gets shown in console

This commit is contained in:
Janis
2022-10-27 20:42:02 +02:00
parent e4bff27a3e
commit bf3c924b51
3 changed files with 7 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
const CONFIG = {
apiKey: "",
apiKey: "9811add4-5ee3-436d-ae9d-d98ff53a1f12",
style: {
fontBackground: "rgba(19, 20, 33, 0.5)",
fontColor: "#ffffff",

View File

@@ -23,10 +23,15 @@ function main() {
ws.onmessage = (event) => {
let data = JSON.parse(event.data);
console.log(data);
// console.log(data);
switch (data.type) {
case "auth":
handleAuthMessage(data);
console.log(
"%c --> API-KEY: %s ",
"color:red;font-weight:bold;",
` ${data.payload.apiKey}`
);
break;
case "clientMoved":
handleClientMoved(data);

View File

@@ -1,5 +1,4 @@
function handleAuthMessage(data) {
console.log("Handling auth message");
channelList.setItems(
parseChannelInfos(data.payload.connections[0].channelInfos)
);