Skip to content

Commit e648179

Browse files
committed
chore: simple demo
Signed-off-by: Adetokunbo Ige <[email protected]>
1 parent 6660ea1 commit e648179

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

todo-app/lambda_function/lambda.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ async def delete_todo(id: str):
129129
try:
130130
# Attempt to delete the item using only the partition key (`id`)
131131
response = table.delete_item(Key={"id": id}) # Using only `id` to identify the item
132-
132+
133133
# Check if the HTTP status code indicates a successful deletion
134134
if response.get("ResponseMetadata", {}).get("HTTPStatusCode") != 200:
135135
logging.warning(f"Delete operation failed for id {id}: {response}")
136136
raise HTTPException(status_code=404, detail="Todo not found")
137-
137+
138138
logging.debug(f"Deleted item with id: {id}")
139139
return {"detail": "Todo deleted successfully"}
140140

@@ -149,8 +149,8 @@ async def delete_todo(id: str):
149149
@app.get("/health")
150150
async def health():
151151
try:
152-
logging.debug("Health check initiated")
153-
return {"message": "Everything looks good!"}
152+
logging.debug("Welcoome,Health check initiated")
153+
return {"message": "Welcoome,Everything looks good!"}
154154
except Exception as e:
155155
logging.error(f"Health check error: {e}")
156156
raise HTTPException(status_code=500, detail="Error performing health check")

0 commit comments

Comments
 (0)