diff --git a/server.py b/server.py index 2976b11..9d5018e 100644 --- a/server.py +++ b/server.py @@ -174,6 +174,15 @@ def addNotification(notificationtype: str): notification = data + # Convert blocks to integer + try: + blocks = int(notification['blocks']) + if blocks <= 0: + return jsonify({"error": "Blocks must be a positive integer"}), 400 + except ValueError: + return jsonify({"error": "Invalid blocks value"}), 400 + + notification['blocks'] = blocks # type: ignore notification['type'] = notificationtype notification['id'] = os.urandom(16).hex() # Generate a random ID for the notification notification['user_name'] = username diff --git a/templates/404.html b/templates/404.html index acea536..b153aa6 100644 --- a/templates/404.html +++ b/templates/404.html @@ -7,6 +7,12 @@ Nathan.Woodburn/ + + + + + + diff --git a/templates/account.html b/templates/account.html index 48afcc4..b6a1d7b 100644 --- a/templates/account.html +++ b/templates/account.html @@ -7,6 +7,12 @@ FireAlerts + + + + + + diff --git a/templates/assets/img/og.png b/templates/assets/img/og.png new file mode 100644 index 0000000..a429b04 Binary files /dev/null and b/templates/assets/img/og.png differ diff --git a/templates/index.html b/templates/index.html index d4419b4..dcf78ba 100644 --- a/templates/index.html +++ b/templates/index.html @@ -7,6 +7,12 @@ FireAlerts + + + + + +