Skip to content

Commit

Permalink
change NewBackendMongo
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Archibald committed Feb 20, 2018
1 parent 2e5ddf7 commit 4b7a6e2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions backendMongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ type email struct {
}

// NewBackendMongo creates a MongoDB-based Backender
func NewBackendMongo(url string, c Crypter) (Backender, error) {
m, err := mgo.Dial(url)
return &backendMongo{m, c}, err
func NewBackendMongo(m mgo.Sessioner, c Crypter) Backender {
return &backendMongo{m, c}
}

func (b *backendMongo) AddUser(email string) (string, error) {
Expand Down

0 comments on commit 4b7a6e2

Please sign in to comment.