diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-12-30 02:09:23 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-12-30 02:09:23 -0800 |
commit | c4afd309b78b5392f427933b7cb423472c4fdbf0 (patch) | |
tree | 624f77cee2dd8e665037678ae230743d16c88e06 /system/api/handlers.go | |
parent | 36441a63a3e1886fdaed5ae9f4bcc05c18d52a11 (diff) |
adding hide to types handler
Diffstat (limited to 'system/api/handlers.go')
-rw-r--r-- | system/api/handlers.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/system/api/handlers.go b/system/api/handlers.go index ae21500..07201ff 100644 --- a/system/api/handlers.go +++ b/system/api/handlers.go @@ -15,8 +15,10 @@ import ( func typesHandler(res http.ResponseWriter, req *http.Request) { var types = []string{} - for t := range item.Types { - types = append(types, string(t)) + for t, fn := range item.Types { + if !hide(fn(), res) { + types = append(types, t) + } } j, err := toJSON(types) |