Fix unconvert
This commit is contained in:
parent
f141f2133b
commit
2f8d1f8e42
@ -19,7 +19,6 @@ linters:
|
|||||||
- unparam
|
- unparam
|
||||||
- golint
|
- golint
|
||||||
- goconst
|
- goconst
|
||||||
- unconvert
|
|
||||||
- bodyclose
|
- bodyclose
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- nakedret
|
- nakedret
|
||||||
|
@ -274,7 +274,7 @@ func TestUseRefreshToken(t *testing.T) {
|
|||||||
delete(t, token, groupID, groupsURL)
|
delete(t, token, groupID, groupsURL)
|
||||||
|
|
||||||
expectEquals(t, 1, len(identityRefresh.Groups))
|
expectEquals(t, 1, len(identityRefresh.Groups))
|
||||||
expectEquals(t, testGroup, string(identityRefresh.Groups[0]))
|
expectEquals(t, testGroup, identityRefresh.Groups[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestUseRefreshTokenUserDeleted(t *testing.T) {
|
func TestUseRefreshTokenUserDeleted(t *testing.T) {
|
||||||
|
@ -156,7 +156,7 @@ func (c *conn) UpdateRefreshToken(id string, updater func(old storage.RefreshTok
|
|||||||
return c.txnUpdate(ctx, keyID(refreshTokenPrefix, id), func(currentValue []byte) ([]byte, error) {
|
return c.txnUpdate(ctx, keyID(refreshTokenPrefix, id), func(currentValue []byte) ([]byte, error) {
|
||||||
var current RefreshToken
|
var current RefreshToken
|
||||||
if len(currentValue) > 0 {
|
if len(currentValue) > 0 {
|
||||||
if err := json.Unmarshal([]byte(currentValue), ¤t); err != nil {
|
if err := json.Unmarshal(currentValue, ¤t); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user