Fixed cookie problems

This commit is contained in:
2026-02-16 00:44:45 +01:00
parent b6e3dd2349
commit c914edd025
4 changed files with 23 additions and 2 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ export function UPGRADE(client: WebSocket, server: WebSocketServer) {
client.send(JSON.stringify({ ok: false, error: "Missing cookies" }));
client.close();
return;
}
};
const supabase = await createClientCookie(new Map(Object.entries(cookies)));
const session = await getSession(supabase);
+2 -1
View File
@@ -9,6 +9,7 @@ import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
import useAction from "@/hook/use-action";
import { getProblems } from "@/modules/problems/actions";
import axios from "axios";
import Cookies from "js-cookie";
export default function Problems() {
const [problems] = useAction(getProblems);
@@ -16,7 +17,7 @@ export default function Problems() {
useEffect(() => {
(async () => {
await axios.post("http://127.0.0.1:63780/auth", {
saveCookies: document.cookie,
saveCookies: Cookies.get(),
});
})().catch(() => {});
}, []);