From d5b39a14fd3fc0d1c364116b41289484df7c27b2 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Thu, 26 Jun 2025 15:01:46 +0200 Subject: [PATCH] fix: remove auth token from /api/command --- frontend/src/api/commands.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/api/commands.ts b/frontend/src/api/commands.ts index 41749470..d29ac1cb 100644 --- a/frontend/src/api/commands.ts +++ b/frontend/src/api/commands.ts @@ -1,6 +1,6 @@ -import { removePrefix } from "./utils"; -import { baseURL } from "@/utils/constants"; import { useAuthStore } from "@/stores/auth"; +import { baseURL } from "@/utils/constants"; +import { removePrefix } from "./utils"; const ssl = window.location.protocol === "https:"; const protocol = ssl ? "wss:" : "ws:"; @@ -14,7 +14,7 @@ export default function command( const authStore = useAuthStore(); url = removePrefix(url); - url = `${protocol}//${window.location.host}${baseURL}/api/command${url}?auth=${authStore.jwt}`; + url = `${protocol}//${window.location.host}${baseURL}/api/command${url}`; const conn = new window.WebSocket(url); conn.onopen = () => conn.send(command);