Jhbate/filter returned data

@kentquirk @jebeck not quite how I wanted to do it but still does the trick. Also ensured we are using an index - I added this to the message-api also and it seems to help
I will change it back. Initially my idea was to have the type and filter
out the common fields that we didn't want to return via the API - but as I
mentioned that approach didn't work

On Wed, Dec 10, 2014 at 10:31 AM, Kent Quirk <notifications@github.com>
wrote:

> In tide-whisperer.go
> <https://github.com/tidepool-org/tide-whisperer/pull/8#discussion-diff-21564101>
> :
>
> >  			Find(bson.M{"$or": []bson.M{bson.M{"groupId": groupId}, bson.M{"_groupId": groupId, "_active": true}}}).
> >  			Sort("time").
> >  			Iter()
> >
> >  		failureReturnCode := 404
> >  		first := false
> > -		var result map[string]interface{}
> > +		var result DeviceData
>
> It's a point for a personal discussion, but this is one place where I
> would not have used a type alias. It's not wrong -- I just personally feel
> that it makes it less clear rather than more clear. But I can see it both
> ways, so...shrug.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/tidepool-org/tide-whisperer/pull/8/files#r21564101>.
>