mirror of
https://github.com/niusmallnan/steve.git
synced 2025-07-18 16:41:13 +00:00
Check for columns for non-watchable types too
This commit is contained in:
parent
eda3ecf987
commit
b78a8b03dd
@ -97,6 +97,19 @@ func (h *handler) queueRefresh() {
|
|||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func isListOrGetable(schema *types.APISchema) bool {
|
||||||
|
for _, verb := range attributes.Verbs(schema) {
|
||||||
|
switch verb {
|
||||||
|
case "list":
|
||||||
|
return true
|
||||||
|
case "get":
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
func isListWatchable(schema *types.APISchema) bool {
|
func isListWatchable(schema *types.APISchema) bool {
|
||||||
var (
|
var (
|
||||||
canList bool
|
canList bool
|
||||||
@ -119,7 +132,7 @@ func (h *handler) getColumns(ctx context.Context, schemas map[string]*types.APIS
|
|||||||
eg := errgroup.Group{}
|
eg := errgroup.Group{}
|
||||||
|
|
||||||
for _, schema := range schemas {
|
for _, schema := range schemas {
|
||||||
if !isListWatchable(schema) {
|
if !isListOrGetable(schema) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user