1
0
Fork 0
forked from forgejo/forgejo

add personal access token panel #12

This commit is contained in:
Unknwon 2014-11-12 06:48:50 -05:00
parent 21b9d5fa1f
commit 8c9338a537
20 changed files with 311 additions and 62 deletions

View file

@ -236,10 +236,10 @@ func GetPublicKeyById(keyId int64) (*PublicKey, error) {
return key, nil
}
// ListPublicKey returns a list of all public keys that user has.
func ListPublicKey(uid int64) ([]*PublicKey, error) {
// ListPublicKeys returns a list of public keys belongs to given user.
func ListPublicKeys(uid int64) ([]*PublicKey, error) {
keys := make([]*PublicKey, 0, 5)
err := x.Find(&keys, &PublicKey{OwnerId: uid})
err := x.Where("owner_id=?", uid).Find(&keys)
if err != nil {
return nil, err
}