From d1d411adca43f95090b994ff2b4774dfa9d442b1 Mon Sep 17 00:00:00 2001 From: zohrehKazemianpour <129424353+zohrehKazemianpour@users.noreply.github.com> Date: Thu, 12 Feb 2026 12:08:21 +0000 Subject: [PATCH 1/2] Fix: Replace psycopg2 with psycopg2-binary for macOS compatibility and update README --- backend/README.md | 3 ++- backend/requirements.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/README.md b/backend/README.md index 8e31e11..08f0aef 100644 --- a/backend/README.md +++ b/backend/README.md @@ -13,7 +13,8 @@ To run: 3. Activate the virtual environment: `. .venv/bin/activate` 4. Install dependencies: `pip install -r requirements.txt` 5. Run the database: `../db/run.sh` (you must have Docker installed and running). -6. Create the database schema: `../db/create-schema.sh` +6.run the server python3 main.py +7. Create the database schema: `../db/create-schema.sh` You may want to run `python3 populate.py` to populate sample data. diff --git a/backend/requirements.txt b/backend/requirements.txt index e03836c..5e11b05 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -11,7 +11,7 @@ idna==3.10 itsdangerous==2.2.0 Jinja2==3.1.5 MarkupSafe==3.0.2 -psycopg2==2.9.10 +psycopg2-binary==2.9.10 pycparser==2.22 PyJWT==2.10.1 python-dotenv==1.0.1 From f9d0efcdf59d3f78dbc2a47f423d225362515ffd Mon Sep 17 00:00:00 2001 From: zohrehKazemianpour <129424353+zohrehKazemianpour@users.noreply.github.com> Date: Mon, 16 Feb 2026 09:40:25 +0000 Subject: [PATCH 2/2] Fix: Add 280 character limit validation to bloom endpoint --- backend/endpoints.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/endpoints.py b/backend/endpoints.py index 0e177a0..b7c091e 100644 --- a/backend/endpoints.py +++ b/backend/endpoints.py @@ -157,8 +157,13 @@ def send_bloom(): return type_check_error user = get_current_user() + content = request.json["content"] - blooms.add_bloom(sender=user, content=request.json["content"]) + # Validate bloom length + if len(content) > 280: + return make_response({"error": "Bloom must be 280 characters or less"}, 400) + + blooms.add_bloom(sender=user, content=content) return jsonify( {