mirror of
https://github.com/netbirdio/netbird.git
synced 2025-05-11 11:45:02 +02:00
remove unnecessary string conversion
This commit is contained in:
parent
511ba6d51f
commit
e1ef091d45
@ -112,7 +112,7 @@ func restore(file string) (*FileStore, error) {
|
|||||||
store.UserID2AccountID[user.Id] = accountID
|
store.UserID2AccountID[user.Id] = accountID
|
||||||
for _, pat := range user.PATs {
|
for _, pat := range user.PATs {
|
||||||
store.TokenID2UserID[pat.ID] = user.Id
|
store.TokenID2UserID[pat.ID] = user.Id
|
||||||
store.HashedPAT2TokenID[string(pat.HashedToken[:])] = pat.ID
|
store.HashedPAT2TokenID[pat.HashedToken[:]] = pat.ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -268,7 +268,7 @@ func (s *FileStore) SaveAccount(account *Account) error {
|
|||||||
s.UserID2AccountID[user.Id] = accountCopy.Id
|
s.UserID2AccountID[user.Id] = accountCopy.Id
|
||||||
for _, pat := range user.PATs {
|
for _, pat := range user.PATs {
|
||||||
s.TokenID2UserID[pat.ID] = user.Id
|
s.TokenID2UserID[pat.ID] = user.Id
|
||||||
s.HashedPAT2TokenID[string(pat.HashedToken[:])] = pat.ID
|
s.HashedPAT2TokenID[pat.HashedToken[:]] = pat.ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user