2022-08-16 15:30:23 +00:00
|
|
|
package router
|
|
|
|
|
|
|
|
import (
|
2022-10-17 08:32:31 +00:00
|
|
|
v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1"
|
2022-08-16 15:30:23 +00:00
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
|
|
|
type BaseRouter struct{}
|
|
|
|
|
2023-12-20 14:44:09 +00:00
|
|
|
func (s *BaseRouter) InitRouter(Router *gin.RouterGroup) {
|
2022-08-16 15:30:23 +00:00
|
|
|
baseRouter := Router.Group("auth")
|
|
|
|
baseApi := v1.ApiGroupApp.BaseApi
|
|
|
|
{
|
2023-01-04 14:31:51 +00:00
|
|
|
baseRouter.GET("/captcha", baseApi.Captcha)
|
|
|
|
baseRouter.POST("/mfalogin", baseApi.MFALogin)
|
|
|
|
baseRouter.POST("/login", baseApi.Login)
|
2023-04-14 10:54:34 +00:00
|
|
|
baseRouter.GET("/issafety", baseApi.CheckIsSafety)
|
2023-01-04 14:31:51 +00:00
|
|
|
baseRouter.POST("/logout", baseApi.LogOut)
|
2023-03-14 07:03:46 +00:00
|
|
|
baseRouter.GET("/demo", baseApi.CheckIsDemo)
|
2023-07-25 09:24:15 +00:00
|
|
|
baseRouter.GET("/language", baseApi.GetLanguage)
|
2022-08-16 15:30:23 +00:00
|
|
|
}
|
|
|
|
}
|