- Header: Bearer your_token_here
- GET /api - API
- POST /auth/login - Login user
- identity [string]
- password [string]
- POST /auth/register - Register new user
- email [string]
- username [string]
- password [string]
- name [string]
- address [string]
- role [string [author, visitor]]
- avatar_url [string]
- All of these route are protected using Bearer token
- GET /user/profile - Get current user profile
- GET /user/:id - Get user profile
- PUT /user/:id - Update user
- name [string]
- address [string]
- role [string [author, visitor]]
- avatar_url [string]
- PUT /change-password - Change password
- password [string]
- new_password [string]
- POST /img - Upload image [avatar, featured_image]
- file [file]
- POST /article - Create new article
- title [string]
- content [string]
- featured_image_url [string]
- GET /article - Get all article
- GET /article/{:id} - Get article by id
- PUT /article/{:id} - Update article by id
- title [string]
- content [string]
- featured_image_url [string]
- DELETE /article/{:id} - Delete article by id
- POST /article/{:id}/comment - Create new comment on article
- comment_text [string]
- DELETE /comment/{:id} - Delete comment
- PUT /comment/{:id} - Update comment
- comment_text [string]
- POST /auth/login - Login user