Open API
Swagger documentation
After starting the project, accesshttp://localhost:3002/apiYou can preview the swagger document.
Module
User
- POST/user/register: User registration (name, password)
- POST/auth/login: User login (name, password)
- POST/user/update: Update user information
- POST/user/password: Update user passwords (oldPassword, newPassword)
Article
- POST/article: Create an article
- GET/article: Get all articles
GET /article/category/: categoryId: Retrieve all articles under the specified categoryGET /article/tag/: tagId: Retrieve all articles under the specified tag- GET/article/archives: Get all article archives
GET /article/: articleId: Get specified article- GET/article/all/recommendation: Get all recommended articles
GET /article/recommend/: articleId: Get recommended articles for the specified articlePOST /article/: articleId/checkPassword: Verify the password of the specified articlePOST /article/: articleId/views: Specify article traffic+1POST /article/: articleId/: Update specified articleDELETE /article/: articleId/: Delete specified article
Article classification
- POST/category: Create article category
- GET/category: Get all article categories
GET /category/: id: Retrieve the specified article categoryPOST /category/: id: Update the specified article categoryDELETE /category/: id: Delete specified article category
Article tags
- POST/tag: Create article tags
- GET/tag: Get all article tags
GET /tag/: id: Get the specified article tagPOST /tag/: id: Update specified article tagsDELETE /tag/: id: Delete the specified article tag
Article comments
- POST/commenting: Create a comment
- GET/commenting: Get all comments
GET /commengt/host/: hostId: Get comments on the specified article (or page)POST /commengt/: id: Update specified commentsDELETE /commengt/: id: Delete specified comment
Page
- POST/page: Create page
- GET/page: Get all pages
GET /page/: id: Retrieve the specified pagePOST /page/: id: Update specified pagePOST /page/: id/views: Specify page views+1DELETE /page/: id: Delete specified page
File
- POST/file/: Upload file
GET /file/: id: Retrieve specified file recordsDELETE /file/: id: Delete specified file records
Search
- POST/search/article: Search for articles
- GET/search: Retrieve all search records
DELETE /search/: id: Delete specified search records
Setting up
- POST/setting: Update settings
- POST/setting/get: Get settings
Email
- POST/smtp: Send email
- GET/smtp: Retrieve email records
DELETE /smtp/: id: Delete specified email records