hngprojects / hng_boilerplate_python_fastapi_web

Apache License 2.0
154 stars 137 forks source link

[FIX]: Change Blog Dislike Endpoint Method From PUT to POST #930

Open chimeziriobioha opened 3 weeks ago

chimeziriobioha commented 3 weeks ago

Description

The endpoint api/v1/blogs/{blog_id}/dislike which enables users to create a BlogDislike object on blog posts is currently using a PUT method which is not meant for creation of new objects. This issue seeks to change it to POST which is appropriate, and update relevant tests.

Expected Behavior

The endpoint should utilize a POST method to ensure best practice.

Screenshots

blog dislike marked in docs

Acceptance Criteria:

Testing: