Skip to content

Commit

Permalink
address PR comment:
Browse files Browse the repository at this point in the history
-fix delete endpoint response
  • Loading branch information
violetaperezandrade committed Apr 30, 2024
1 parent 64b4c8c commit 915fa45
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/controller/measurements.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from fastapi import status
from fastapi.responses import JSONResponse
from fastapi.encoders import jsonable_encoder
from service.measurements import MeasurementsService
from service.plants import PlantsService
from schemas.measurement import MeasurementSavedSchema
Expand Down Expand Up @@ -72,7 +73,9 @@ def handle_delete_device_plant_relation(self, type_id, id):
if response:
return JSONResponse(
status_code=status.HTTP_200_OK,
content=response
content=jsonable_encoder({
"message": "Device plant relation deleted successfully.",
}),
)
return JSONResponse(
status_code=status.HTTP_204_NO_CONTENT,
Expand Down

0 comments on commit 915fa45

Please sign in to comment.