mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-04 18:21:06 +02:00
removed User.Tokens temporary index
This commit is contained in:
parent
a50d972d8e
commit
768b6c7e48
@ -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…
x
Reference in New Issue
Block a user