chore: add sign in tests
All checks were successful
Build and Push Docker Image / Explore-Gitea-Actions (push) Successful in 54s
All checks were successful
Build and Push Docker Image / Explore-Gitea-Actions (push) Successful in 54s
This commit was merged in pull request #188.
This commit is contained in:
@@ -51,9 +51,9 @@ type ServiceAuthImpl struct {
|
||||
dbAuth db.DbAuth
|
||||
}
|
||||
|
||||
func NewServiceAuthImpl(d *sql.DB) *ServiceAuthImpl {
|
||||
func NewServiceAuthImpl(dbAuth db.DbAuth) *ServiceAuthImpl {
|
||||
return &ServiceAuthImpl{
|
||||
dbAuth: db.NewDbAuthSqlite(d),
|
||||
dbAuth: dbAuth,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ func (service ServiceAuthImpl) SignIn(email string, password string) (*User, err
|
||||
if errors.Is(err, db.ErrUserNotFound) {
|
||||
return nil, ErrInvaidCredentials
|
||||
} else {
|
||||
return nil, err
|
||||
return nil, types.ErrInternal
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user