feat(auth): 添加用户登录功能
This commit is contained in:
1 parent
92a9e20934
commit
63c8f2980b
10 files changed
+210
-18
No files matched your search
@@ -1,7 +1,18 @@
|
||||
package router
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
import (
|
||||
"EnGin/internal/api"
|
||||
"EnGin/internal/api/auth_api"
|
||||
"EnGin/internal/middleware"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func AuthRouter(g *gin.RouterGroup) {
|
||||
app := api.App.AuthApi
|
||||
|
||||
g.POST("login",
|
||||
middleware.BindJsonMiddleware[auth_api.LoginRequest],
|
||||
middleware.AuthRateLimit,
|
||||
app.LoginView)
|
||||
}
|
||||
Reference in new issue
Block a user