ClimateMind / climatemind-backend

Your climate action is here 🌎 Our API is a source for learning how climate change personally affects you and the things you care about most. Additionally, it will teach a scientifically proven method for communicating to others that climate change is a personally relevant issue to inspire action.
https://contribute.climatemind.org/v/rest-api/
MIT License
18 stars 19 forks source link

Change response code for 'delete conversation' to 200 #489

Closed Svenstar74 closed 1 year ago

Svenstar74 commented 1 year ago

When using 204 as a response (like it is currently), I don't get any response, although it actually wants to return the conversationId and a message:

image image

When using 200, meaning the deletion was successful, the response properly returns the data:

image image

This resolves a bug for the frontend, where an error occurs, because it cannot read the response, as there currently is no response.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change

Comparison is base (1e5462b) 74.30% compared to head (c358394) 74.30%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #489 +/- ## ======================================== Coverage 74.30% 74.30% ======================================== Files 85 85 Lines 2681 2681 Branches 315 315 ======================================== Hits 1992 1992 Misses 657 657 Partials 32 32 ``` | [Impacted Files](https://codecov.io/gh/ClimateMind/climatemind-backend/pull/489?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind) | Coverage Δ | | |---|---|---| | [app/conversations/routes.py](https://codecov.io/gh/ClimateMind/climatemind-backend/pull/489?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind#diff-YXBwL2NvbnZlcnNhdGlvbnMvcm91dGVzLnB5) | `85.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.