From a7cb43678637eb9a86d4f55ab30a632220f58b00 Mon Sep 17 00:00:00 2001 From: mytja Date: Sat, 26 Oct 2024 23:56:02 +0200 Subject: [PATCH] vzpostavi prijavo --- src/Login.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Login.svelte b/src/Login.svelte index 2782332..02b3dd3 100644 --- a/src/Login.svelte +++ b/src/Login.svelte @@ -16,7 +16,7 @@ fd.append("email", email); fd.append("pass", password); try { - let r = await fetch(`${constants.baseurl}/user/login`, {body: fd, method: "POST"}) + let r = await fetch(`${constants.baseurl}/user/login`, {body: fd, method: "POST", credentials: "include"}) let response = await r.json(); if (response["success"] === true) { localStorage.setItem("role", response["data"]["role"]);