forked from TrueCloudLab/frostfs-http-gw
migrate to new api v1.0.0
This commit is contained in:
parent
a9f4ee535a
commit
799d391508
2 changed files with 3 additions and 3 deletions
4
app.go
4
app.go
|
@ -108,14 +108,14 @@ func newApp(opt ...Option) App {
|
|||
a.reqHealth = new(state.HealthRequest)
|
||||
a.reqHealth.SetTTL(service.NonForwardingTTL)
|
||||
|
||||
if err := service.SignRequestHeader(a.key, a.reqHealth); err != nil {
|
||||
if err := service.SignDataWithSessionToken(a.key, a.reqHealth); err != nil {
|
||||
a.log.Fatal("could not sign `HealthRequest`", zap.Error(err))
|
||||
}
|
||||
|
||||
a.reqNetmap = new(state.NetmapRequest)
|
||||
a.reqNetmap.SetTTL(service.SingleForwardingTTL)
|
||||
|
||||
if err := service.SignRequestHeader(a.key, a.reqNetmap); err != nil {
|
||||
if err := service.SignDataWithSessionToken(a.key, a.reqNetmap); err != nil {
|
||||
a.log.Fatal("could not sign `NetmapRequest`", zap.Error(err))
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ func (a *app) receiveFile(c *fasthttp.RequestCtx) {
|
|||
req := &object.GetRequest{Address: refs.Address{ObjectID: oid, CID: cid}}
|
||||
req.SetTTL(service.SingleForwardingTTL)
|
||||
|
||||
if err = service.SignRequestHeader(a.key, req); err != nil {
|
||||
if err = service.SignDataWithSessionToken(a.key, req); err != nil {
|
||||
log.Error("could not sign request", zap.Error(err))
|
||||
c.Error("could not sign request", fasthttp.StatusBadRequest)
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue