Skip to content

Commit d5697ff

Browse files
author
Adetokunbo Ige
committed
feat: code improvements
Signed-off-by: Adetokunbo Ige <[email protected]>
1 parent f3013e6 commit d5697ff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

todo-app/lambda_function/lambda.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ async def update_todo(id: str, request: UpdateTodoRequest):
124124

125125

126126
# Delete a todo item in the DynamoDB table (using only `id` as the partition key)
127-
@app.delete("/todos/{id}", status_code=204)
127+
@app.delete("/todos/{id}", status_code=200)
128128
async def delete_todo(id: str):
129129
try:
130130
# Attempt to delete the item using only the partition key (`id`)
@@ -146,7 +146,6 @@ async def delete_todo(id: str):
146146
logging.error(f"Unexpected error deleting todo with id {id}: {e}")
147147
raise HTTPException(status_code=500, detail="Error deleting todo")
148148

149-
150149
@app.get("/health")
151150
async def health():
152151
try:

0 commit comments

Comments
 (0)