feat: article: finish base functions
This commit is contained in:
@@ -8,6 +8,15 @@ import (
|
||||
func articlePrivateRouter(router *gin.RouterGroup) {
|
||||
articleRouter := router.Group("/article")
|
||||
{
|
||||
articleRouter.POST("/save", handler.SaveArticleHandler)
|
||||
articleRouter.POST("/:id", handler.SaveArticleHandler)
|
||||
}
|
||||
}
|
||||
|
||||
func articlePublicRouter(router *gin.RouterGroup) {
|
||||
articleRouter := router.Group("/article")
|
||||
{
|
||||
articleRouter.GET("/list", handler.GetAllArticlesHandler)
|
||||
articleRouter.DELETE("/:id", handler.DeleteArticleHandler)
|
||||
articleRouter.GET("/:id", handler.GetArticleHandler)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ func BusiRouter() {
|
||||
// Public
|
||||
{
|
||||
statisticRouter(publicRouter)
|
||||
articlePublicRouter(publicRouter)
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
func statisticRouter(router *gin.RouterGroup) {
|
||||
statisticsRouter := router.Group("/statistics")
|
||||
{
|
||||
statisticsRouter.GET("/provience/:sort", handler.ProvienceDataHandler)
|
||||
statisticsRouter.GET("/provience/:sort", handler.ProvinceDataHandler)
|
||||
statisticsRouter.GET("/city/:sort", handler.CityDataHandler)
|
||||
statisticsRouter.GET("/country/child", handler.CountryDataHandler)
|
||||
statisticsRouter.GET("/country", handler.CountryDataHandler)
|
||||
|
||||
Reference in New Issue
Block a user