mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-24 01:10:31 +00:00
removed User.Tokens temporary index
This commit is contained in:
parent
a50d972d8e
commit
768b6c7e48
2 changed files with 0 additions and 6 deletions
|
@ -14,8 +14,4 @@ type User struct {
|
|||
// Repos contains a list of subscriptions
|
||||
// to repositories the user is watching.
|
||||
Repos map[string]struct{} `json:"-"`
|
||||
|
||||
// Tokens contains a list of tokens for
|
||||
// the user account.
|
||||
Tokens map[string]struct{} `json:"-"`
|
||||
}
|
||||
|
|
|
@ -9,11 +9,9 @@ import (
|
|||
func (db *DB) GetToken(user, label string) (*common.Token, error) {
|
||||
token := &common.Token{}
|
||||
key := []byte(user + "/" + label)
|
||||
|
||||
err := db.View(func(t *bolt.Tx) error {
|
||||
return get(t, bucketTokens, key, token)
|
||||
})
|
||||
|
||||
return token, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue