From 4fbe73455354c30e4e7e9d3f4a61dd0453671d04 Mon Sep 17 00:00:00 2001 From: ZabihollahNamazi Date: Thu, 2 Jul 2026 13:02:02 +0100 Subject: [PATCH 1/2] git ignore --- .gitignore | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitignore b/.gitignore index e43b0f98..a0f3a019 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,11 @@ .DS_Store +# Virtual environments +venv/ +.venv/ +env/ +.env/ +ENV/ + +# Python cache files +__pycache__/ +*.pyc From 6bec16c3fe972e1b4633c719c7be4c649a3a4c97 Mon Sep 17 00:00:00 2001 From: ZabihollahNamazi Date: Thu, 2 Jul 2026 14:20:34 +0100 Subject: [PATCH 2/2] extra long bloom --- backend/endpoints.py | 5 ++++- front-end/components/error.mjs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/endpoints.py b/backend/endpoints.py index 0e177a07..c9d1e576 100644 --- a/backend/endpoints.py +++ b/backend/endpoints.py @@ -156,7 +156,10 @@ def send_bloom(): if type_check_error is not None: return type_check_error - user = get_current_user() + if len(request.json["content"]) > 280: + return make_response((f"Bloom too long", 422)) + + user = get_current_user() blooms.add_bloom(sender=user, content=request.json["content"]) diff --git a/front-end/components/error.mjs b/front-end/components/error.mjs index 3fc9eeee..515a4fe2 100644 --- a/front-end/components/error.mjs +++ b/front-end/components/error.mjs @@ -7,6 +7,7 @@ const _STATUS_MESSAGES = { 404: "Not Found - The requested resource does not exist.", 405: "Not Allowed - The server knows the request method, but the target resource doesn't support this method.", 418: "I'm a teapot - Server refuses to brew coffee with a teapot.", + 422: "Something is wrong with the information you filled out. Please check your inputs and try again.", 500: "Internal Server Error - Something went wrong on the server.", };