1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 16:29:17 +08:00

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{} type BaseRouter struct{}
func (s *BaseRouter) InitBaseRouter(Router *gin.RouterGroup) (R gin.IRoutes) { func (s *BaseRouter) InitBaseRouter(Router *gin.RouterGroup) {
baseRouter := Router.Group("auth") baseRouter := Router.Group("auth")
withRecordRouter := baseRouter.Use(middleware.OperationRecord()) withRecordRouter := Router.Group("auth").Use(middleware.OperationRecord())
baseApi := v1.ApiGroupApp.BaseApi baseApi := v1.ApiGroupApp.BaseApi
{ {
baseRouter.GET("captcha", baseApi.Captcha)
withRecordRouter.POST("login", baseApi.Login) withRecordRouter.POST("login", baseApi.Login)
withRecordRouter.POST("logout", baseApi.LogOut) withRecordRouter.POST("logout", baseApi.LogOut)
baseRouter.GET("captcha", baseApi.Captcha)
} }
return baseRouter
} }

View File

@ -2,6 +2,7 @@ package router
import ( import (
v1 "github.com/1Panel-dev/1Panel/app/api/v1" v1 "github.com/1Panel-dev/1Panel/app/api/v1"
"github.com/1Panel-dev/1Panel/middleware"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
@ -9,7 +10,7 @@ import (
type TerminalRouter struct{} type TerminalRouter struct{}
func (s *UserRouter) InitTerminalRouter(Router *gin.RouterGroup) { 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 baseApi := v1.ApiGroupApp.BaseApi
{ {
terminalRouter.GET("", baseApi.WsSsh) terminalRouter.GET("", baseApi.WsSsh)