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
|
// Repos contains a list of subscriptions
|
||||||
// to repositories the user is watching.
|
// to repositories the user is watching.
|
||||||
Repos map[string]struct{} `json:"-"`
|
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) {
|
func (db *DB) GetToken(user, label string) (*common.Token, error) {
|
||||||
token := &common.Token{}
|
token := &common.Token{}
|
||||||
key := []byte(user + "/" + label)
|
key := []byte(user + "/" + label)
|
||||||
|
|
||||||
err := db.View(func(t *bolt.Tx) error {
|
err := db.View(func(t *bolt.Tx) error {
|
||||||
return get(t, bucketTokens, key, token)
|
return get(t, bucketTokens, key, token)
|
||||||
})
|
})
|
||||||
|
|
||||||
return token, err
|
return token, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue