File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,14 @@ if (typeof window !== 'undefined') {
32
32
schemas : async ( search ?: string ) => {
33
33
const result = await api . methods . timeseriesSchemaList ( { query : { limit : 1000 } } )
34
34
const data = handleResult ( result )
35
- if ( ! search ) return data . items
36
- return data . items . filter ( ( s ) => s . timeseriesName . includes ( search ) )
35
+
36
+ let filtered = data . items
37
+ if ( search ) {
38
+ filtered = filtered . filter ( ( s ) => s . timeseriesName . includes ( search ) )
39
+ }
40
+ // note we both print as table _and_ return in case the caller wants the data
41
+ console . table ( filtered )
42
+ return filtered
37
43
} ,
38
- schemasTable : async ( search ?: string ) =>
39
- // @ts -expect-error
40
- console . table ( await window . oxql . schemas ( search ) ) ,
41
44
}
42
45
}
You can’t perform that action at this time.
0 commit comments