From 1a433cdbc703c4d180d18350067047d59ae34d15 Mon Sep 17 00:00:00 2001
From: Maksymilian Jopek <maks@jopek.eu>
Date: Thu, 28 Apr 2022 12:44:44 +0200
Subject: Reuire data on login/register

---
 frontend/src/Login.svelte | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'frontend/src/Login.svelte')

diff --git a/frontend/src/Login.svelte b/frontend/src/Login.svelte
index 674ca47..affca89 100644
--- a/frontend/src/Login.svelte
+++ b/frontend/src/Login.svelte
@@ -10,6 +10,10 @@
     password = "qwerty";
 
   async function register() {
+    if ([email, login, password].includes("")) {
+      pt = "Not all required data given";
+      return;
+    }
     const res = await postToServer(
       "/login",
       { email, login, password, mode },
-- 
cgit v1.3.1

