This project is an API designed for a MiniBlog platform.
The API was structured around 4 Entities/Tables:
- Authors
- Articles
- Categories
- Comments
These were the main technologies used in this project:
Clone the project on your machine and install dependencies with the command:
yarn
Then create a .env file, copying the .env.example file format:
cp .env.example .env
Set your environment variables with your Postgres credentials and a new database of your choice.
Run migrations with the command:
yarn typeorm migration:run -d src/data-source.ts
Run tests with the command:
yarn test
Some routes need authentication. The authentication used is the Bearer Token type.
The token is generated automatically at Author Login.
Thus, to access routes with authentication, it is necessary to create an author and be logged in with that author.
In addition, some routes require the author to be the owner of the account, or the author who created the article or the category.
Please read each route's documentation to understand which authentications are required.
The Author object is defined as:
Field | Type | Description |
---|---|---|
id | string | Author's unique identifier |
firstName | string | Author's first name |
lastName | string | Author's last name |
age | number | Author's age |
string | Author's email | |
password | string | Author's password |
articles | array | Articles written by author |
categories | array | Categories created by author |
Method | Route | Description |
---|---|---|
POST | /authors | Creates an author |
GET | /authors | List all authors |
GET | /authors/:authorId | Lists an author using its ID as a parameter |
PATCH | /authors/:authorId | Updates an author using its ID as a parameter |
DELETE | /authors/:authorId | Deletes an author using its ID as a parameter |
- URL: https://miniblog-leadsoft.herokuapp.com/authors
- Authorization: None
- Content-type: application/json
Request body example
{
"firstName": "Sarah",
"lastName": "Spencer",
"age": 29,
"email": "[email protected]",
"password": "HJsuiv87*"
}
Status 201 - Created
{
"message": "Author registered successfully.",
"author": {
"id": "f1719800-2e5a-4270-88de-64380f73dd3d",
"firstName": "Sarah",
"lastName": "Spencer",
"age": 29,
"email": "[email protected]"
}
}
Status 400 - Missing required field
{
"status": "Error",
"code": 400,
"message": "(any object key) is a required field."
}
Status 400 - Invalid data type or length
{
"status": "Error",
"code": 400,
"message": "yup error message"
}
Status 409 - Email already registered
{
"status": "Error",
"code": 409,
"message": "This email has already been registered."
}
- URL: https://miniblog-leadsoft.herokuapp.com/authors
- Authorization: None
- Empty Body
Status 200 - OK
{
"message": "Successful request.",
"authors": [
{
"id": "f1719800-2e5a-4270-88de-64380f73dd3d",
"firstName": "Sarah",
"lastName": "Spencer",
"age": 29,
"email": "[email protected]",
"articles": [],
"categories": []
},
...
]
}
- No expected errors
- URL: https://miniblog-leadsoft.herokuapp.com/authors/:authorId
- Authorization: None
- Empty Body
Status 200 - OK
{
"message": "Successful request.",
"author": {
"id": "f1719800-2e5a-4270-88de-64380f73dd3d",
"firstName": "Sarah",
"lastName": "Spencer",
"age": 29,
"email": "[email protected]",
"articles": [],
"categories": []
}
}
Status 404 - Author not found
{
"status": "Error",
"code": 404,
"message": "Author not found."
}
- URL: https://miniblog-leadsoft.herokuapp.com/authors/:authorId
- Authorization: Bearer Token
- User must be the owner of the account
- Content-type: application/json
Request headers
{
"authorization": "Bearer Token"
}
Request body example
{
"firstName?": "Sarah",
"lastName?": "Spencer",
"age?": 29,
"email?": "[email protected]"
}
- At least one field is required
Status 200 - OK
{
"message": "Author updated successfully.",
"author": {
"id": "f1719800-2e5a-4270-88de-64380f73dd3d",
"firstName": "Sarah",
"lastName": "Spencer",
"age": 29,
"email": "[email protected]",
"articles": [],
"categories": []
}
}
Status 401 - Missing authorization token
{
"status": "Error",
"code": 401,
"message": "Missing authorization token."
}
Status 401 - Invalid token
{
"status": "Error",
"code": 401,
"message": "Invalid token."
}
Status 401 - Author is not the account owner
{
"status": "Error",
"code": 401,
"message": "Author is not the account owner."
}
Status 409 - Email already registered
{
"status": "Error",
"code": 409,
"message": "This email has already been registered."
}
Status 400 - Invalid data type or length
{
"status": "Error",
"code": 400,
"message": "yup error message"
}
Status 404 - Author not found
{
"status": "Error",
"code": 404,
"message": "Author not found."
}
- URL: https://miniblog-leadsoft.herokuapp.com/authors/:authorId
- Authorization: Bearer Token
- Author must be the owner of the account
- Empty Body
Request headers
{
"authorization": "Bearer Token"
}
Status 200 - OK
{
"message": "Author deleted successfully."
}
Status 401 - Missing authorization token
{
"status": "Error",
"code": 401,
"message": "Missing authorization token."
}
Status 401 - Invalid token
{
"status": "Error",
"code": 401,
"message": "Invalid token."
}
Status 401 - Author is not the account owner
{
"status": "Error",
"code": 401,
"message": "Author is not the account owner."
}
Status 404 - Author not found
{
"status": "Error",
"code": 404,
"message": "Author not found."
}
The Login object is defined as:
Field | Type | Description |
---|---|---|
string | Author's email | |
password | string | Author's password |
Method | Route | Description |
---|---|---|
POST | /login | Login author |
- URL: https://miniblog-leadsoft.herokuapp.com/login
- Authorization: None
- Content-type: application/json
Request body example
{
"email": "[email protected]",
"password": "HJsuiv87*"
}
Status 200 - OK
{
"message": "Successful login.",
"token": "yJhbGciOiJIUzI1NiJ9.eyJSb2xlIjoiQWRtaW4iLCJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkphdmFJblVzZSIsImV4cCI6MTY2MjY4ODU1OCwiaWF0IjoxNjYyNjg4NTU4fQ.OONsla408_ohD5XE9b3-qfWaniZC95pgyBetmJeKViA"
}
Status 400 - Missing required field
{
"status": "Error",
"code": 400,
"message": "email/password is a required field"
}
Status 401 - Invalid email or password
{
"status": "Error",
"code": 401,
"message": "Invalid email or password."
}
The Article object is defined as:
Field | Type | Description |
---|---|---|
id | string | Article unique identifier |
title | string | Article title |
description | string | Article description |
text | string | Article text |
author | object | Article author |
category | null or object | Article category |
comments | array | Article comments |
Method | Route | Description |
---|---|---|
POST | /articles | Creates an article |
GET | /articles | List all articles |
GET | /articles/:articleId | Lists an article using its ID as a parameter |
PATCH | /articles/:articleId | Updates an article using its ID as a parameter |
DELETE | /articles/:articleId | Deletes an article using its ID as a parameter |
- URL: https://miniblog-leadsoft.herokuapp.com/articles
- Authorization: Bearer Token
- Content-type: application/json
Request headers
{
"authorization": "Bearer Token"
}
Request body example
{
"title": "The Little Mermaid: Why the Outdated Princess Movie Needed a Remake",
"description": "While the original Little Mermaid is considered to be a Disney classic, there are still some solid reasons warranting the 2023 remake.",
"text": "The reimagined live-action Disney classics have become a controversial topic around the internet. Bringing favorite fairy tales to live-action is a dream come true for many and a nightmare for others. Regardless, Disney's remakes have become a guilty pleasure for many moviegoers, and sometimes have more room to develop their characters and create nuance in plot (due to modern screenwriters, longer runtimes, and more). Aladdin added more political intrigue, The Jungle Book brought innovative CGI and cameras to the industry, and Cruella updated its soundtrack and fashion. With all the praise and complaints these movies generate, audiences are wondering what Disney will add to its next live action film.",
"authorId": "d409d0ed-2e04-4682-8b23-cd0b8084c3ea"
}
Status 201 - Created
{
"message": "Article created successfully.",
"article": {
"id": "b5ecc3e6-ca7e-4d5c-824a-56f1dbc1aec1",
"title": "The Little Mermaid: Why the Outdated Princess Movie Needed a Remake",
"description": "While the original Little Mermaid is considered to be a Disney classic, there are still some solid reasons warranting the 2023 remake.",
"text": "The reimagined live-action Disney classics have become a controversial topic around the internet. Bringing favorite fairy tales to live-action is a dream come true for many and a nightmare for others. Regardless, Disney's remakes have become a guilty pleasure for many moviegoers, and sometimes have more room to develop their characters and create nuance in plot (due to modern screenwriters, longer runtimes, and more). Aladdin added more political intrigue, The Jungle Book brought innovative CGI and cameras to the industry, and Cruella updated its soundtrack and fashion. With all the praise and complaints these movies generate, audiences are wondering what Disney will add to its next live action film.",
"author": {
"id": "f1719800-2e5a-4270-88de-64380f73dd3d",
"firstName": "Sarah",
"lastName": "Spencer",
"age": 29,
"email": "[email protected]"
}
}
}
Status 401 - Missing authorization token
{
"status": "Error",
"code": 401,
"message": "Missing authorization token."
}
Status 401 - Invalid token
{
"status": "Error",
"code": 401,
"message": "Invalid token."
}
Status 400 - Missing required field
{
"status": "Error",
"code": 400,
"message": "(any object key) is a required field."
}
Status 400 - Invalid data type or length
{
"status": "Error",
"code": 400,
"message": "yup error message"
}
Status 409 - Title already registered
{
"status": "Error",
"code": 409,
"message": "There is already an article with this title."
}
Status 404 - Author not found
{
"status": "Error",
"code": 404,
"message": "Author not found."
}
- URL: https://miniblog-leadsoft.herokuapp.com/articles
- Authorization: None
- Empty Body
Status 200 - OK
{
"message": "Successful request.",
"articles": [
{
"id": "b5ecc3e6-ca7e-4d5c-824a-56f1dbc1aec1",
"title": "The Little Mermaid: Why the Outdated Princess Movie Needed a Remake",
"description": "While the original Little Mermaid is considered to be a Disney classic, there are still some solid reasons warranting the 2023 remake.",
"text": "The reimagined live-action Disney classics have become a controversial topic around the internet. Bringing favorite fairy tales to live-action is a dream come true for many and a nightmare for others. Regardless, Disney's remakes have become a guilty pleasure for many moviegoers, and sometimes have more room to develop their characters and create nuance in plot (due to modern screenwriters, longer runtimes, and more). Aladdin added more political intrigue, The Jungle Book brought innovative CGI and cameras to the industry, and Cruella updated its soundtrack and fashion. With all the praise and complaints these movies generate, audiences are wondering what Disney will add to its next live action film.",
"author": {
"id": "f1719800-2e5a-4270-88de-64380f73dd3d",
"firstName": "Sarah",
"lastName": "Spencer",
"age": 29,
"email": "[email protected]"
},
"category": null,
"comments": []
},
...
]
}
- No expected errors
- URL: https://miniblog-leadsoft.herokuapp.com/articles/:articleId
- Authorization: None
- Empty Body
Status 200 - OK
{
"message": "Successful request.",
"article": {
"id": "b5ecc3e6-ca7e-4d5c-824a-56f1dbc1aec1",
"title": "The Little Mermaid: Why the Outdated Princess Movie Needed a Remake",
"description": "While the original Little Mermaid is considered to be a Disney classic, there are still some solid reasons warranting the 2023 remake.",
"text": "The reimagined live-action Disney classics have become a controversial topic around the internet. Bringing favorite fairy tales to live-action is a dream come true for many and a nightmare for others. Regardless, Disney's remakes have become a guilty pleasure for many moviegoers, and sometimes have more room to develop their characters and create nuance in plot (due to modern screenwriters, longer runtimes, and more). Aladdin added more political intrigue, The Jungle Book brought innovative CGI and cameras to the industry, and Cruella updated its soundtrack and fashion. With all the praise and complaints these movies generate, audiences are wondering what Disney will add to its next live action film.",
"author": {
"id": "f1719800-2e5a-4270-88de-64380f73dd3d",
"firstName": "Sarah",
"lastName": "Spencer",
"age": 29,
"email": "[email protected]"
},
"category": null,
"comments": []
}
}
Status 404 - Article not found
{
"status": "Error",
"code": 404,
"message": "Article not found."
}
- URL: https://miniblog-leadsoft.herokuapp.com/articles/:articleId
- Authorization: Bearer Token
- User must be the article author
- Content-type: application/json
Request headers
{
"authorization": "Bearer Token"
}
Request body example
{
"title?": "The Little Mermaid: Understand the 2023 remake",
"description?": "While the original Little Mermaid is considered to be a Disney classic, there are still some solid reasons warranting the 2023 remake.",
"text?": "The reimagined live-action Disney classics have become a controversial topic around the internet. Bringing favorite fairy tales to live-action is a dream come true for many and a nightmare for others. Regardless, Disney's remakes have become a guilty pleasure for many moviegoers, and sometimes have more room to develop their characters and create nuance in plot (due to modern screenwriters, longer runtimes, and more). Aladdin added more political intrigue, The Jungle Book brought innovative CGI and cameras to the industry, and Cruella updated its soundtrack and fashion. With all the praise and complaints these movies generate, audiences are wondering what Disney will add to its next live action film.",
"categoryId?": "2e87d7cc-3541-49f9-a5e6-4030c8184a46"
}
- At least one field is required
Status 200 - OK
{
"message": "Article updated successfully.",
"article": {
"id": "b5ecc3e6-ca7e-4d5c-824a-56f1dbc1aec1",
"title": "The Little Mermaid: Understand the 2023 remake",
"description": "While the original Little Mermaid is considered to be a Disney classic, there are still some solid reasons warranting the 2023 remake.",
"text": "The reimagined live-action Disney classics have become a controversial topic around the internet. Bringing favorite fairy tales to live-action is a dream come true for many and a nightmare for others. Regardless, Disney's remakes have become a guilty pleasure for many moviegoers, and sometimes have more room to develop their characters and create nuance in plot (due to modern screenwriters, longer runtimes, and more). Aladdin added more political intrigue, The Jungle Book brought innovative CGI and cameras to the industry, and Cruella updated its soundtrack and fashion. With all the praise and complaints these movies generate, audiences are wondering what Disney will add to its next live action film.",
"author": {
"id": "f1719800-2e5a-4270-88de-64380f73dd3d",
"firstName": "Sarah",
"lastName": "Spencer",
"age": 29,
"email": "[email protected]"
},
"category": {
"id": "2e87d7cc-3541-49f9-a5e6-4030c8184a46",
"name": "Entertainment",
"type": "Movies"
}
}
}
Status 401 - Missing authorization token
{
"status": "Error",
"code": 401,
"message": "Missing authorization token."
}
Status 401 - Invalid token
{
"status": "Error",
"code": 401,
"message": "Invalid token."
}
Status 401 - User is not the author who wrote this article
{
"status": "Error",
"code": 401,
"message": "User is not the author who wrote this article."
}
Status 409 - Title already registered
{
"status": "Error",
"code": 409,
"message": "There is already an article with this title."
}
Status 400 - Invalid data type or length
{
"status": "Error",
"code": 400,
"message": "yup error message"
}
Status 404 - Article not found
{
"status": "Error",
"code": 404,
"message": "Article not found."
}
- URL: https://miniblog-leadsoft.herokuapp.com/articles/:articleId
- Authorization: Bearer Token
- User must be the article author
- Empty Body
Request headers
{
"authorization": "Bearer Token"
}
Status 200 - OK
{
"message": "Article deleted successfully."
}
Status 401 - Missing authorization token
{
"status": "Error",
"code": 401,
"message": "Missing authorization token."
}
Status 401 - Invalid token
{
"status": "Error",
"code": 401,
"message": "Invalid token."
}
Status 401 - User is not the author who wrote this article
{
"status": "Error",
"code": 401,
"message": "User is not the author who wrote this article."
}
Status 404 - Article not found
{
"status": "Error",
"code": 404,
"message": "Article not found."
}
The Category object is defined as:
Field | Type | Description |
---|---|---|
id | string | Category unique identifier |
name | string | Category name |
type | string | Category type |
author | object | Category author |
articles | array | Articles in this category |
Method | Route | Description |
---|---|---|
POST | /categories | Creates a category |
GET | /categories | List all categories |
GET | /categories/:categoryId | Lists a category using its ID as a parameter |
PATCH | /categories/:categoryId | Updates a category using its ID as a parameter |
DELETE | /categories/:categoryId | Deletes a category using its ID as a parameter |
- URL: https://miniblog-leadsoft.herokuapp.com/categories
- Authorization: Bearer Token
- Content-type: application/json
Request headers
{
"authorization": "Bearer Token"
}
Request body example
{
"name": "Entertainment",
"type": "Movies",
"authorId": "d409d0ed-2e04-4682-8b23-cd0b8084c3ea"
}
Status 201 - Created
{
"message": "Category created successfully.",
"category": {
"id": "9f61e25a-abb4-4bf5-a29b-d4aab8d79a2a",
"name": "Entertainment",
"type": "Movies",
"author": {
"id": "f1719800-2e5a-4270-88de-64380f73dd3d",
"firstName": "Sarah",
"lastName": "Spencer",
"age": 29,
"email": "[email protected]"
}
}
}
Status 401 - Missing authorization token
{
"status": "Error",
"code": 401,
"message": "Missing authorization token."
}
Status 401 - Invalid token
{
"status": "Error",
"code": 401,
"message": "Invalid token."
}
Status 400 - Missing required field
{
"status": "Error",
"code": 400,
"message": "(any object key) is a required field."
}
Status 400 - Invalid data type or length
{
"status": "Error",
"code": 400,
"message": "yup error message"
}
Status 409 - Name already registered
{
"status": "Error",
"code": 409,
"message": "There is already a category with this name."
}
Status 404 - Author not found
{
"status": "Error",
"code": 404,
"message": "Author not found."
}
- URL: https://miniblog-leadsoft.herokuapp.com/categories
- Authorization: None
- Empty Body
Status 200 - OK
{
"message": "Successful request.",
"categories": [
{
"id": "9f61e25a-abb4-4bf5-a29b-d4aab8d79a2a",
"name": "Entertainment",
"type": "Movies",
"author": {
"id": "f1719800-2e5a-4270-88de-64380f73dd3d",
"firstName": "Sarah",
"lastName": "Spencer",
"age": 29,
"email": "[email protected]"
},
"articles": []
},
...
]
}
- No expected errors
- URL: https://miniblog-leadsoft.herokuapp.com/categories/:categoryId
- Authorization: None
- Empty Body
Status 200 - OK
{
"message": "Successful request.",
"category": {
"id": "9f61e25a-abb4-4bf5-a29b-d4aab8d79a2a",
"name": "Entertainment",
"type": "Movies",
"author": {
"id": "f1719800-2e5a-4270-88de-64380f73dd3d",
"firstName": "Sarah",
"lastName": "Spencer",
"age": 29,
"email": "[email protected]"
},
"articles": []
}
}
Status 404 - Category not found
{
"status": "Error",
"code": 404,
"message": "Category not found."
}
- URL: https://miniblog-leadsoft.herokuapp.com/categories/:categoryId
- Authorization: Bearer Token
- User must be the author that created the category
- Content-type: application/json
Request headers
{
"authorization": "Bearer Token"
}
Request body example
{
"name?": "Entertainment",
"type?": "Movies and TV Shows"
}
- At least one field is required
Status 200 - OK
{
"message": "Category updated successfully.",
"category": {
"id": "9f61e25a-abb4-4bf5-a29b-d4aab8d79a2a",
"name": "Entertainment",
"type": "Movies and TV Shows"
}
}
Status 401 - Missing authorization token
{
"status": "Error",
"code": 401,
"message": "Missing authorization token."
}
Status 401 - Invalid token
{
"status": "Error",
"code": 401,
"message": "Invalid token."
}
Status 401 - User is not the author that created this category
{
"status": "Error",
"code": 401,
"message": "User is not the author that created this category."
}
Status 409 - Name already registered
{
"status": "Error",
"code": 409,
"message": "There is already a category with this name."
}
Status 400 - Invalid data type or length
{
"status": "Error",
"code": 400,
"message": "yup error message"
}
Status 404 - Category not found
{
"status": "Error",
"code": 404,
"message": "Category not found."
}
- URL: https://miniblog-leadsoft.herokuapp.com/categories/:categoryId
- Authorization: Bearer Token
- User must be the author that created the category
- Empty Body
Request headers
{
"authorization": "Bearer Token"
}
Status 200 - OK
{
"message": "Category deleted successfully."
}
Status 401 - Missing authorization token
{
"status": "Error",
"code": 401,
"message": "Missing authorization token."
}
Status 401 - Invalid token
{
"status": "Error",
"code": 401,
"message": "Invalid token."
}
Status 401 - User is not the author that created this category
{
"status": "Error",
"code": 401,
"message": "User is not the author that created this category."
}
Status 404 - Category not found
{
"status": "Error",
"code": 404,
"message": "Category not found."
}
The Comment object is defined as:
Field | Type | Description |
---|---|---|
id | string | Comment unique identifier |
text | string | Comment text |
article | object | Article of this comment |
Method | Route | Description |
---|---|---|
POST | /comments | Creates a comment |
GET | /comments | List all comments |
GET | /comments/:commentId | Lists a comment using its ID as a parameter |
PATCH | /comments/:commentId | Updates a comment using its ID as a parameter |
DELETE | /comments/:commentId | Deletes a comment using its ID as a parameter |
- URL: https://miniblog-leadsoft.herokuapp.com/comments
- Authorization: None
- Content-type: application/json
Request body example
{
"text": "Loved this article!",
"articleId": "430be73d-1159-437e-961f-d46f18505471"
}
Status 201 - Created
{
"message": "Comment created successfully.",
"comment": {
"id": "2ef3011c-63e9-4b49-9d87-af23f5b3e676",
"text": "Loved this article!",
"article": {
"id": "b5ecc3e6-ca7e-4d5c-824a-56f1dbc1aec1",
"title": "The Little Mermaid: Understand the 2023 remake",
"description": "While the original Little Mermaid is considered to be a Disney classic, there are still some solid reasons warranting the 2023 remake.",
"text": "The reimagined live-action Disney classics have become a controversial topic around the internet. Bringing favorite fairy tales to live-action is a dream come true for many and a nightmare for others. Regardless, Disney's remakes have become a guilty pleasure for many moviegoers, and sometimes have more room to develop their characters and create nuance in plot (due to modern screenwriters, longer runtimes, and more). Aladdin added more political intrigue, The Jungle Book brought innovative CGI and cameras to the industry, and Cruella updated its soundtrack and fashion. With all the praise and complaints these movies generate, audiences are wondering what Disney will add to its next live action film."
}
}
}
Status 400 - Missing required field
{
"status": "Error",
"code": 400,
"message": "(any object key) is a required field."
}
Status 400 - Invalid data type or length
{
"status": "Error",
"code": 400,
"message": "yup error message"
}
Status 409 - Text already registered
{
"status": "Error",
"code": 409,
"message": "There is already a comment with this text."
}
Status 404 - Article not found
{
"status": "Error",
"code": 404,
"message": "Article not found."
}
- URL: https://miniblog-leadsoft.herokuapp.com/comments
- Authorization: None
- Empty Body
Status 200 - OK
{
"message": "Successful request.",
"comments": [
{
"id": "2ef3011c-63e9-4b49-9d87-af23f5b3e676",
"text": "Loved this article!",
"article": {
"id": "b5ecc3e6-ca7e-4d5c-824a-56f1dbc1aec1",
"title": "The Little Mermaid: Understand the 2023 remake",
"description": "While the original Little Mermaid is considered to be a Disney classic, there are still some solid reasons warranting the 2023 remake.",
"text": "The reimagined live-action Disney classics have become a controversial topic around the internet. Bringing favorite fairy tales to live-action is a dream come true for many and a nightmare for others. Regardless, Disney's remakes have become a guilty pleasure for many moviegoers, and sometimes have more room to develop their characters and create nuance in plot (due to modern screenwriters, longer runtimes, and more). Aladdin added more political intrigue, The Jungle Book brought innovative CGI and cameras to the industry, and Cruella updated its soundtrack and fashion. With all the praise and complaints these movies generate, audiences are wondering what Disney will add to its next live action film."
}
},
...
]
}
- No expected errors
- URL: https://miniblog-leadsoft.herokuapp.com/comments/:commentId
- Authorization: None
- Empty Body
Status 200 - OK
{
"message": "Successful request.",
"comment": {
"id": "2ef3011c-63e9-4b49-9d87-af23f5b3e676",
"text": "Loved this article!",
"article": {
"id": "b5ecc3e6-ca7e-4d5c-824a-56f1dbc1aec1",
"title": "The Little Mermaid: Understand the 2023 remake",
"description": "While the original Little Mermaid is considered to be a Disney classic, there are still some solid reasons warranting the 2023 remake.",
"text": "The reimagined live-action Disney classics have become a controversial topic around the internet. Bringing favorite fairy tales to live-action is a dream come true for many and a nightmare for others. Regardless, Disney's remakes have become a guilty pleasure for many moviegoers, and sometimes have more room to develop their characters and create nuance in plot (due to modern screenwriters, longer runtimes, and more). Aladdin added more political intrigue, The Jungle Book brought innovative CGI and cameras to the industry, and Cruella updated its soundtrack and fashion. With all the praise and complaints these movies generate, audiences are wondering what Disney will add to its next live action film."
}
}
}
Status 404 - Comment not found
{
"status": "Error",
"code": 404,
"message": "Comment not found."
}
- URL: https://miniblog-leadsoft.herokuapp.com/comments/:commentId
- Authorization: None
- Content-type: application/json
Request body example
{
"text": "Really liked this article!"
}
- It is necessary to send a text to be able to edit a comment.
Status 200 - OK
{
"message": "Comment updated successfully.",
"comment": {
"id": "2ef3011c-63e9-4b49-9d87-af23f5b3e676",
"text": "Really liked this article!",
"article": {
"id": "b5ecc3e6-ca7e-4d5c-824a-56f1dbc1aec1",
"title": "The Little Mermaid: Understand the 2023 remake",
"description": "While the original Little Mermaid is considered to be a Disney classic, there are still some solid reasons warranting the 2023 remake.",
"text": "The reimagined live-action Disney classics have become a controversial topic around the internet. Bringing favorite fairy tales to live-action is a dream come true for many and a nightmare for others. Regardless, Disney's remakes have become a guilty pleasure for many moviegoers, and sometimes have more room to develop their characters and create nuance in plot (due to modern screenwriters, longer runtimes, and more). Aladdin added more political intrigue, The Jungle Book brought innovative CGI and cameras to the industry, and Cruella updated its soundtrack and fashion. With all the praise and complaints these movies generate, audiences are wondering what Disney will add to its next live action film."
}
}
}
Status 409 - Text already registered
{
"status": "Error",
"code": 409,
"message": "There is already a comment with this text."
}
Status 400 - Invalid data type or length
{
"status": "Error",
"code": 400,
"message": "yup error message"
}
Status 404 - Comment not found
{
"status": "Error",
"code": 404,
"message": "Comment not found."
}
- URL: https://miniblog-leadsoft.herokuapp.com/comments/:commentId
- Authorization: None
- Empty Body
Status 200 - OK
{
"message": "Comment deleted successfully."
}
Status 404 - Comment not found
{
"status": "Error",
"code": 404,
"message": "Comment not found."
}