mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
refactor(coderd/database): split Time
and Now
into dbtime
package (#9482)
Ref: #9380
This commit is contained in:
committed by
GitHub
parent
702b064cac
commit
19d7da3d24
@ -12,7 +12,7 @@ import (
|
||||
"golang.org/x/oauth2/github"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/coder/coder/v2/coderd/database"
|
||||
"github.com/coder/coder/v2/coderd/database/dbtime"
|
||||
"github.com/coder/coder/v2/codersdk"
|
||||
)
|
||||
|
||||
@ -182,7 +182,7 @@ func (c *DeviceAuth) ExchangeDeviceCode(ctx context.Context, deviceCode string)
|
||||
return &oauth2.Token{
|
||||
AccessToken: body.AccessToken,
|
||||
RefreshToken: body.RefreshToken,
|
||||
Expiry: database.Now().Add(time.Duration(body.ExpiresIn) * time.Second),
|
||||
Expiry: dbtime.Now().Add(time.Duration(body.ExpiresIn) * time.Second),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user