Fixes #996 pin expiry is updated if set in options
This commit is contained in:
parent
e3e14bd15f
commit
788ecff327
|
@ -1496,7 +1496,9 @@ func (c *Cluster) PinUpdate(ctx context.Context, from cid.Cid, to cid.Cid, opts
|
|||
if opts.Name != "" {
|
||||
existing.Name = opts.Name
|
||||
}
|
||||
|
||||
if !opts.ExpireAt.IsZero() && opts.ExpireAt.After(time.Now()) {
|
||||
existing.ExpireAt = opts.ExpireAt
|
||||
}
|
||||
return existing, c.consensus.LogPin(ctx, existing)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user