调整indexAction路径,允许用户自定义接收的slice,配合gorm只能搜索
This commit is contained in:
1 parent
b98997a69f
commit
4e39e915ea
4 files changed
+9
-13
No files matched your search
+4
-1
@@ -112,7 +112,10 @@ func registerSysJobRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddlew
|
||||
r := v1.Group("/sysjob").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
|
||||
{
|
||||
sysJob := &models.SysJob{}
|
||||
r.GET("", actions.IndexAction(sysJob, new(dto.SysJobSearch)))
|
||||
r.GET("", actions.IndexAction(sysJob, new(dto.SysJobSearch), func() interface{} {
|
||||
list := make([]models.SysJob, 0)
|
||||
return &list
|
||||
}))
|
||||
r.GET("/:id", actions.ViewAction(sysJob))
|
||||
r.POST("", actions.CreateAction(sysJob))
|
||||
r.PUT("", actions.UpdateAction(sysJob))
|
||||
|
||||
Reference in new issue
Block a user