From 8d943dc61e0cb3d09fe525268b9db420ace89ec8 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Sat, 3 Mar 2018 20:02:03 -0700 Subject: [PATCH] Add ByID param so transformer to known --- store/transform/transform.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/store/transform/transform.go b/store/transform/transform.go index 787e846ec..bd5138ffd 100644 --- a/store/transform/transform.go +++ b/store/transform/transform.go @@ -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) {