DeployHelper/internal/router/sys_login_log_router.go

35 lines
857 B
Go

package router
import (
"ego/internal/handler"
"ego/internal/middleware"
"ego/internal/wire"
"github.com/gin-gonic/gin"
)
// @tag.name 登录记录
// @tag.description 登录记录相关的所有接口,包括创建、删除、更新、查询等
func init() {
apiRouterFns = append(apiRouterFns, func(group *gin.RouterGroup) {
SysLoginLogRouter(group, wire.InjectSysLoginLogHandler())
})
}
// SysLoginLogRouter 登录日志路由
func SysLoginLogRouter(r *gin.RouterGroup, h *handler.SysLoginLogHandler) {
g := r.Group("/sysLoginLog")
// 登录日志需要认证
g.Use(middleware.AuthRequired())
{
g.POST("/create", h.Create)
g.POST("/delete", h.DeleteByID)
g.POST("/update", h.UpdateByID)
g.POST("/get", h.GetByID)
g.POST("/list", h.GetByCondition)
g.POST("/list/ids", h.ListByIDs)
g.POST("/delete/ids", h.DeleteByIDs)
}
}