2022-08-16 23:30:23 +08:00
|
|
|
package router
|
|
|
|
|
|
|
|
import (
|
2022-10-17 16:32:31 +08:00
|
|
|
v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1"
|
|
|
|
"github.com/1Panel-dev/1Panel/backend/middleware"
|
2022-08-16 23:30:23 +08:00
|
|
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
2022-11-15 17:20:57 +08:00
|
|
|
type LogRouter struct{}
|
2022-08-16 23:30:23 +08:00
|
|
|
|
2022-11-15 17:20:57 +08:00
|
|
|
func (s *LogRouter) InitLogRouter(Router *gin.RouterGroup) {
|
|
|
|
operationRouter := Router.Group("logs")
|
2022-09-29 16:15:59 +08:00
|
|
|
operationRouter.Use(middleware.JwtAuth()).Use(middleware.SessionAuth()).Use(middleware.PasswordExpired())
|
2022-08-16 23:30:23 +08:00
|
|
|
baseApi := v1.ApiGroupApp.BaseApi
|
|
|
|
{
|
2022-11-15 17:20:57 +08:00
|
|
|
operationRouter.POST("login", baseApi.GetLoginLogs)
|
|
|
|
operationRouter.POST("operation", baseApi.GetOperationLogs)
|
2022-08-16 23:30:23 +08:00
|
|
|
}
|
|
|
|
}
|