Posts
GET /posts - get all posts
Response body
[
{
"id": "1",
"title": "My awesome post"
},
{
"id": "2",
"title": "Not as good as first one"
}
]
POST /posts - create a new post
Request body
{
"title": "My awesome post",
"content": "All words I know",
"previewImg": "https://gph.is/V4zGWG",
"author": "John Smith"
}
Response body - success
{
"id": "1"
}
Response body - failure
{
"message": "Something went wrong",
"success": false
}