repository/auth/auth.go
Method Service.MobileVerify
has 6 return statements (exceeds 4 allowed). Open
Open
func (s *Service) MobileVerify(c context.Context, countryCode, mobile, code string, signup bool) (*model.AuthToken, error) {
// send code to twilio
err := s.mob.CheckCode(countryCode, mobile, code)
if err != nil {
return nil, err
Method Service.Authenticate
has 6 return statements (exceeds 4 allowed). Open
Open
func (s *Service) Authenticate(c context.Context, email, password string) (*model.AuthToken, error) {
u, err := s.userRepo.FindByEmail(email)
if err != nil {
return nil, apperr.Unauthorized
}
Function NewAuthService
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func NewAuthService(userRepo model.UserRepo, accountRepo model.AccountRepo, jwt JWT, m mail.Service, mob mobile.Service) *Service {