chore: add sign in tests
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:
2024-09-27 12:33:52 +02:00
committed by Tim Wundenberg
parent 5d479b0811
commit da05ba5b56
3 changed files with 115 additions and 7 deletions

View File

@@ -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
}
}