Skip to content

Commit 601b84d

Browse files
committed
adjust all delete endpoints
1 parent 83591b2 commit 601b84d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

app/controllers/api/v1/event_procedures_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def destroy
5353
result = EventProcedures::Destroy.result(id: event_procedure.id.to_s)
5454

5555
if result.success?
56-
deleted_successfully_render(result.event_procedure)
56+
render json: { message: "EventProcedure deleted successfully." }, status: :ok
5757
else
5858
render json: result.error, status: :unprocessable_entity
5959
end

app/controllers/api/v1/hospitals_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def destroy
3939
result = Hospitals::Destroy.result(id: hospital.id.to_s)
4040

4141
if result.success?
42-
deleted_successfully_render(result.hospital)
42+
render json: { message: "Hospital deleted successfully." }, status: :ok
4343
else
4444
render json: result.error, status: :unprocessable_entity
4545
end

app/controllers/api/v1/patients_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def destroy
4343
result = Patients::Destroy.result(id: patient.id.to_s)
4444

4545
if result.success?
46-
deleted_successfully_render(result.patient)
46+
render json: { message: "Patient deleted successfully." }, status: :ok
4747
else
4848
render json: result.error, status: :unprocessable_entity
4949
end

app/controllers/api/v1/procedures_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def destroy
4141
result = Procedures::Destroy.result(id: procedure.id.to_s)
4242

4343
if result.success?
44-
deleted_successfully_render(result.procedure)
44+
render json: { message: "Procedure deleted successfully." }, status: :ok
4545
else
4646
render json: result.error, status: :unprocessable_entity
4747
end

0 commit comments

Comments
 (0)