diff --git a/apis/department.go b/apis/department.go index e26a045..bc6f4cf 100644 --- a/apis/department.go +++ b/apis/department.go @@ -48,7 +48,7 @@ func (e *Department) GetAction(key string) response.Action { } func (e *Department) Other(r *gin.RouterGroup) { - r.GET("/departments", e.List) + r.GET("/departments", response.AuthHandler, e.List) } // List 部门列表 diff --git a/apis/post.go b/apis/post.go index 7ad7f93..1b65a07 100644 --- a/apis/post.go +++ b/apis/post.go @@ -49,7 +49,7 @@ func (e *Post) GetAction(key string) response.Action { } func (e *Post) Other(r *gin.RouterGroup) { - r.GET("/posts", e.List) + r.GET("/posts", response.AuthHandler, e.List) } // List 岗位列表