| Index: go/src/infra/gae/epservice/example/service_currentvalue.go
|
| diff --git a/go/src/infra/gae/epservice/example/service_currentvalue.go b/go/src/infra/gae/epservice/example/service_currentvalue.go
|
| index ec64fcae55712f0ef80c3f21d0158d93593265e1..b161be10702ffad9459f2cbd4829b1d967c8b098 100644
|
| --- a/go/src/infra/gae/epservice/example/service_currentvalue.go
|
| +++ b/go/src/infra/gae/epservice/example/service_currentvalue.go
|
| @@ -6,8 +6,8 @@ package example
|
|
|
| import (
|
| "golang.org/x/net/context"
|
| - "infra/gae/libs/wrapper"
|
| - "infra/gae/libs/wrapper/gae"
|
| + "infra/gae/libs/gae"
|
| + "infra/gae/libs/gae/prod"
|
|
|
| "github.com/GoogleCloudPlatform/go-endpoints/endpoints"
|
| )
|
| @@ -23,11 +23,13 @@ type CurrentValueRsp struct {
|
| }
|
|
|
| // CurrentValue gets the current value of a counter (duh)
|
| -func (Example) CurrentValue(c endpoints.Context, r *CurrentValueReq) (rsp *CurrentValueRsp, err error) {
|
| - ds := wrapper.GetDS(gae.Use(context.Background(), c))
|
| +func (Example) CurrentValue(c context.Context, r *CurrentValueReq) (rsp *CurrentValueRsp, err error) {
|
| + c = prod.Use(c)
|
| + rds := gae.GetRDS(c)
|
|
|
| - ctr := &Counter{ID: r.Name}
|
| - if err = ds.Get(ctr); err != nil {
|
| + key := rds.NewKey("Counter", r.Name, 0, nil)
|
| + ctr := &Counter{}
|
| + if err = rds.Get(key, ctr); err != nil {
|
| return
|
| }
|
|
|
|
|