✨ 重新初始化项目
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
package app
|
||||
package router
|
||||
|
||||
import (
|
||||
"Lee-WineList/api/app"
|
||||
"Lee-WineList/middleware"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@@ -10,6 +9,6 @@ import (
|
||||
func login(g *gin.RouterGroup) {
|
||||
// 登录相关接口
|
||||
g.POST("/token", app.LoginApi().Login)
|
||||
g.POST("/token/refresh", app.LoginApi().Refresh)
|
||||
g.POST("/token/logout", middleware.AuthorizeToken(), app.LoginApi().Logout)
|
||||
//g.POST("/token/refresh", app.LoginApi().Refresh)
|
||||
//g.POST("/token/logout", middleware.AuthorizeToken(), app.LoginApi().Logout)
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package app
|
||||
package router
|
||||
|
||||
import (
|
||||
"Lee-WineList/middleware"
|
||||
@@ -9,4 +9,5 @@ import (
|
||||
func InitRoute(g *gin.RouterGroup) {
|
||||
login(g) // 登录相关路由
|
||||
user(g.Group("/user", middleware.AuthorizeToken())) // 用户相关路由
|
||||
wine(g.Group("/wine"))
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package app
|
||||
package router
|
||||
|
||||
import (
|
||||
"Lee-WineList/api/app"
|
10
router/wine.go
Normal file
10
router/wine.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"Lee-WineList/api/app"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func wine(g *gin.RouterGroup) {
|
||||
g.GET("", app.WineApi().GetList)
|
||||
}
|
Reference in New Issue
Block a user