services/session: Use user.ID.EncodeToString() where possible #1581
2 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@ func (s *TokenStore) Create(_ context.Context, body *session.CreateRequestBody)
|
|||
s.mtx.Lock()
|
||||
s.tokens[key{
|
||||
tokenID: base58.Encode(uidBytes),
|
||||
ownerID: base58.Encode(id.WalletBytes()),
|
||||
ownerID: id.EncodeToString(),
|
||||
}] = storage.NewPrivateToken(&sk.PrivateKey, body.GetExpiration())
|
||||
s.mtx.Unlock()
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ func (s *TokenStore) Get(ownerID user.ID, tokenID []byte) *storage.PrivateToken
|
|||
s.mtx.RLock()
|
||||
t := s.tokens[key{
|
||||
tokenID: base58.Encode(tokenID),
|
||||
ownerID: base58.Encode(ownerID.WalletBytes()),
|
||||
ownerID: ownerID.EncodeToString(),
|
||||
}]
|
||||
s.mtx.RUnlock()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue