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);