From 0061fb72107e3782972d3440da9bcbb357720569 Mon Sep 17 00:00:00 2001 From: StevinD Date: Sat, 14 Feb 2026 09:44:33 +0000 Subject: [PATCH 1/2] Fix API behavior to satisfy tests --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index bf69788..c22c2ef 100644 --- a/app/main.py +++ b/app/main.py @@ -26,7 +26,7 @@ def health_check(): @app.get("/sum") def compute_sum(a: int = Query(...), b: int = Query(...)): - return {"result": a * b} + return {"result": a + b} def format_profile(data): From 2a6828aa88a3665686111ee5d890fc3ece8dbc4f Mon Sep 17 00:00:00 2001 From: StevinD <23d18.stevin@sjec.ac.in> Date: Sat, 14 Feb 2026 15:23:32 +0530 Subject: [PATCH 2/2] Inconsistent error messages between get_profile and delete_profile #16 --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index f9e31db..49561a1 100644 --- a/app/main.py +++ b/app/main.py @@ -60,7 +60,7 @@ def get_profile(username: str): def delete_profile(username: str): """Delete a user profile by username.""" if username not in profile_store: - raise HTTPException(status_code=404, detail="User not found") + raise HTTPException(status_code=404, detail="Profile not found") del profile_store[username] return {"deleted": True}