14 lines
387 B
Go
14 lines
387 B
Go
package accountdb
|
|
|
|
import (
|
|
"context"
|
|
customermodel "git.sendico.io/tech/sxchnge/product/customers/model"
|
|
|
|
"git.sendico.io/tech/sxchnge/shared/database/repository"
|
|
)
|
|
|
|
func (db *AccountDB) GetByEmail(ctx context.Context, email string) (*customermodel.Account, error) {
|
|
var account customermodel.Account
|
|
return &account, db.FindOne(ctx, repository.Filter("login", email), &account)
|
|
}
|