From 7e909fae848014ccfe0d3dd4c5aedb4ed4a2d9cd Mon Sep 17 00:00:00 2001 From: cyfraeviolae Date: Wed, 3 Apr 2024 13:59:28 -0400 Subject: valid --- app.py | 2 ++ templates/event.html | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index f5d0b85..c8dddd0 100644 --- a/app.py +++ b/app.py @@ -239,6 +239,8 @@ async def join(state: State, request: Request, iden: str, data: Annotated[JoinRe name = data.name if len(name) > 50: return error("Name too long.") + if len(name) == 0: + return error("Name too short.") invites = json.loads(event.invites) if name in invites: return error("Name already exists in event.") diff --git a/templates/event.html b/templates/event.html index 9171021..e9f7192 100644 --- a/templates/event.html +++ b/templates/event.html @@ -37,7 +37,7 @@ {% if manage %}
Title: - + {% else %}

{{ event.title }}

{% endif %} @@ -50,7 +50,7 @@
When? {% if manage %} - + {% else %} {% endif %} @@ -59,7 +59,7 @@ Where? {% if manage %} - + {% else %} {{ event.location }} {% endif %} @@ -69,7 +69,7 @@ What?
{% if manage %} - +
{% else %} {{ event.description }} @@ -100,7 +100,7 @@ {% else %} {% endif %} - +
-- cgit v1.2.3