fix: 修改错误系统日志打印

This commit is contained in:
ssongliu 2022-08-29 18:10:37 +08:00 committed by ssongliu
parent 7089775109
commit 907d8614a8
2 changed files with 5 additions and 5 deletions

View File

@ -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
}

View File

@ -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)