LOGIN
+- Brugernavn
- -
- Password
- -
- + + + +
+ + + +
{{ error }}
+ +diff --git a/frontend/src/assets/helpers.js b/frontend/src/assets/helpers.js
index ee196cd..e79c35a 100644
--- a/frontend/src/assets/helpers.js
+++ b/frontend/src/assets/helpers.js
@@ -5,9 +5,10 @@ function request(method, path, data = null) {
if (xhr.status >= 200 && xhr.status < 300)
resolve(xhr.responseText ? JSON.parse(xhr.responseText) : null);
else
- reject(xhr.responseText ? JSON.parse(xhr.responseText).title : "HTTP " + xhr.status);
+ reject(xhr.responseText || "HTTP " + xhr.status);
}
xhr.onerror = () => reject("Something went wrong");
+ xhr.withCredentials = true;
xhr.open(method, import.meta.env.VITE_API_URL + path);
if (data) xhr.setRequestHeader("Content-Type", "application/json"),
xhr.send(JSON.stringify(data));
diff --git a/frontend/src/views/LoginView.vue b/frontend/src/views/LoginView.vue
index ffcfccc..17f2518 100644
--- a/frontend/src/views/LoginView.vue
+++ b/frontend/src/views/LoginView.vue
@@ -1,17 +1,43 @@
{{ error }}LOGIN
+
- Brugernavn
-
-
- Password
-
-
-
+
+
+
+
+
+
+
+
{{ error }}