JSON Body
{
"email" : string,
"password" : string,
}
POST /api/auth/signup
Response: Success message or Error message
POST /api/auth/signin
Response
{
"email":string,
"accessToken":string,
"refreshToken":string
}
Authorization required for posts PUT, POST, DELETE methods
POST /api/posts/
PUT /api/posts/:id
DELETE /api/posts/:id
Header:
'Authentication':'Bearer xxxxxxxxxxxxxxxx'
GET /api/posts/
Optional query parameters
Parameter | Type | Description |
---|---|---|
limit |
string |
limit |
offset |
string |
offset |
Response: Posts array
GET /api/posts/:id
Response: Posts element
GET /api/posts/:id
Response: Posts element
POST /api/posts/
JSON Request Body
{
"content" : string,
}
Response: New Posts element
PUT /api/posts/:id
JSON Request Body
{
"content" : string,
}
Response: New Posts element
DELETE /api/posts/:id
Response: Deleted Posts element
{
"id" : string,
"createdAt": date,
"updatedAt": date,
"email": string,
"password": string,
"posts": Post[]
}
{
"id" : string,
"createdAt": date,
"updatedAt": date,
"content": string,
"authorId": string,
"author": User
}