Skip to content

Commit 71a282f

Browse files
author
John Deng
committed
adde at.UseMiddleware to middleware for filtering controller
1 parent 51c7e7b commit 71a282f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

examples/hiboot-operator/controllers/rest.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ type PodListResponse struct {
2323
type Controller struct {
2424
// at.RestController or at.RestController must be embedded here
2525
at.RestController
26+
at.UseMiddleware
2627
at.RequestMapping `value:"/api/v1/namespaces/{namespace}"`
2728
}
2829

pkg/kubeclient/middleware.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212

1313
type middleware struct {
1414
at.Middleware
15+
at.UseMiddleware
1516
}
1617

1718
func newMiddleware() *middleware {

0 commit comments

Comments
 (0)