added gravatar
This commit is contained in:
@@ -56,7 +56,7 @@ func (self *rethinkStore) GetAccountByLogin(emailOrName string) (*models.Account
|
||||
var account models.Account
|
||||
err = resp.One(&account)
|
||||
if err != nil {
|
||||
return nil, errors.New("Not found")
|
||||
return nil, ErrAccountNotFound
|
||||
}
|
||||
|
||||
return &account, nil
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package stores
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/torkelo/grafana-pro/pkg/models"
|
||||
)
|
||||
|
||||
@@ -17,6 +19,11 @@ type Store interface {
|
||||
Close()
|
||||
}
|
||||
|
||||
// Typed errors
|
||||
var (
|
||||
ErrAccountNotFound = errors.New("Account not found")
|
||||
)
|
||||
|
||||
func New() Store {
|
||||
return NewRethinkStore(&RethinkCfg{DatabaseName: "grafana"})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user