- Added Oauth2LogLoginService for managing user authorization logs. - Implemented methods for inserting logs, cleaning logs, and exporting log data. - Created a new file for Oauth2 login log service. refactor: Remove unused open_api module - Deleted the open_api.go file as it was not utilized in the project. fix: Update error codes in SysProfileController - Changed error codes for binding errors and user authentication errors to more descriptive values. fix: Update cache handling in SysConfig and SysDictType services - Modified Redis set operations to include expiration time for cached values. refactor: Update middleware authorization checks - Replaced PreAuthorize middleware with AuthorizeUser across multiple routes in system and tool modules for consistency. chore: Clean up trace and ws modules - Updated middleware authorization in trace and ws modules to use AuthorizeUser.
40 lines
691 B
Go
40 lines
691 B
Go
package kpi_c_title
|
|
|
|
import (
|
|
"be.ems/src/framework/middleware"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// Register Routes for kpi_c_title
|
|
func Register(r *gin.RouterGroup) {
|
|
|
|
pmKPIC := r.Group("/kpiC")
|
|
{
|
|
var k *KpiCTitle
|
|
pmKPIC.GET("/title",
|
|
middleware.AuthorizeUser(nil),
|
|
k.Get,
|
|
)
|
|
pmKPIC.GET("/title/total",
|
|
middleware.AuthorizeUser(nil),
|
|
k.Total,
|
|
)
|
|
pmKPIC.GET("/title/totalList",
|
|
middleware.AuthorizeUser(nil),
|
|
k.GetToalList,
|
|
)
|
|
pmKPIC.POST("/title",
|
|
middleware.AuthorizeUser(nil),
|
|
k.Post,
|
|
)
|
|
pmKPIC.PUT("/title/:id",
|
|
middleware.AuthorizeUser(nil),
|
|
k.Put,
|
|
)
|
|
pmKPIC.DELETE("/title/:id",
|
|
middleware.AuthorizeUser(nil),
|
|
k.Delete,
|
|
)
|
|
}
|
|
}
|