1Panel/backend/router/ro_base.go

23 lines
612 B
Go
Raw Normal View History

2022-08-16 15:30:23 +00:00
package router
import (
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{}
2022-08-29 10:10:37 +00:00
func (s *BaseRouter) InitBaseRouter(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)
baseRouter.GET("/status", baseApi.CheckIsFirstLogin)
baseRouter.POST("/init", baseApi.InitUserInfo)
baseRouter.POST("/logout", baseApi.LogOut)
baseRouter.GET("/demo", baseApi.CheckIsDemo)
2022-08-16 15:30:23 +00:00
}
}