Navigation Menu

Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lomik committed Aug 24, 2017
1 parent ba35124 commit 43148cf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions api/api.go
Expand Up @@ -102,13 +102,11 @@ func (api *Api) CacheQuery(ctx context.Context, req *carbonpb.CacheRequest) (*ca

m := &carbonpb.Metric{
Metric: req.Metrics[i],
Points: make([]*carbonpb.Point, len(data)),
Points: make([]carbonpb.Point, len(data)),
}
for j := 0; j < len(data); j++ {
m.Points[j] = &carbonpb.Point{
Timestamp: uint32(data[j].Timestamp),
Value: data[j].Value,
}
m.Points[j].Timestamp = uint32(data[j].Timestamp)
m.Points[j].Value = data[j].Value
}

res.Metrics = append(res.Metrics, m)
Expand Down

0 comments on commit 43148cf

Please sign in to comment.