Likes

Liking/Unliking operations

Like Blog Post

post

Adds a like to a specific blog post. Increments likes count.

Authorizations
Path parameters
blogIdstring · objectidRequired

ID of the blog post.

Responses
200
Blog liked successfully. Returns new likes count.
application/json
post
POST /api/v1/likes/blog/{blogId} HTTP/1.1
Host: blog-api.codewithsadee.com
Authorization: Bearer JWT
Accept: */*
{
  "likesCount": 15
}

Unlike Blog Post

delete

Removes a like from a specific blog post. Decrements likes count.

Authorizations
Path parameters
blogIdstring · objectidRequired

ID of the blog post.

Responses
204
Request successful, no response body.
delete
DELETE /api/v1/likes/blog/{blogId} HTTP/1.1
Host: blog-api.codewithsadee.com
Authorization: Bearer JWT
Accept: */*

No content

Was this helpful?