1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-16 23:29:16 +00:00

Add ByID param so transformer to known

This commit is contained in:
Darren Shepherd
2018-03-03 20:02:03 -07:00
parent 410b3efe86
commit de91ccaa71

View File

@@ -30,7 +30,11 @@ func (s *Store) ByID(apiContext *types.APIContext, schema *types.Schema, id stri
if s.Transformer == nil {
return data, nil
}
return s.Transformer(apiContext, data, nil)
return s.Transformer(apiContext, data, &types.QueryOptions{
Options: map[string]string{
"ByID": "true",
},
})
}
func (s *Store) Watch(apiContext *types.APIContext, schema *types.Schema, opt *types.QueryOptions) (chan map[string]interface{}, error) {