mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-25 11:21:05 +00:00
removed User.Tokens temporary index
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user