mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-27 12:39:01 +08:00
fix: 修改错误系统日志打印
This commit is contained in:
parent
7089775109
commit
907d8614a8
@ -8,14 +8,13 @@ import (
|
||||
|
||||
type BaseRouter struct{}
|
||||
|
||||
func (s *BaseRouter) InitBaseRouter(Router *gin.RouterGroup) (R gin.IRoutes) {
|
||||
func (s *BaseRouter) InitBaseRouter(Router *gin.RouterGroup) {
|
||||
baseRouter := Router.Group("auth")
|
||||
withRecordRouter := baseRouter.Use(middleware.OperationRecord())
|
||||
withRecordRouter := Router.Group("auth").Use(middleware.OperationRecord())
|
||||
baseApi := v1.ApiGroupApp.BaseApi
|
||||
{
|
||||
baseRouter.GET("captcha", baseApi.Captcha)
|
||||
withRecordRouter.POST("login", baseApi.Login)
|
||||
withRecordRouter.POST("logout", baseApi.LogOut)
|
||||
baseRouter.GET("captcha", baseApi.Captcha)
|
||||
}
|
||||
return baseRouter
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package router
|
||||
|
||||
import (
|
||||
v1 "github.com/1Panel-dev/1Panel/app/api/v1"
|
||||
"github.com/1Panel-dev/1Panel/middleware"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@ -9,7 +10,7 @@ import (
|
||||
type TerminalRouter struct{}
|
||||
|
||||
func (s *UserRouter) InitTerminalRouter(Router *gin.RouterGroup) {
|
||||
terminalRouter := Router.Group("terminals")
|
||||
terminalRouter := Router.Group("terminals").Use(middleware.JwtAuth()).Use(middleware.SessionAuth())
|
||||
baseApi := v1.ApiGroupApp.BaseApi
|
||||
{
|
||||
terminalRouter.GET("", baseApi.WsSsh)
|
||||
|
Loading…
Reference in New Issue
Block a user