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 = { const CONFIG = {
apiKey: "", apiKey: "9811add4-5ee3-436d-ae9d-d98ff53a1f12",
style: { style: {
fontBackground: "rgba(19, 20, 33, 0.5)", fontBackground: "rgba(19, 20, 33, 0.5)",
fontColor: "#ffffff", fontColor: "#ffffff",

View File

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

View File

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