Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: refactored auth services to use interfaces #394

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

samuelIkoli
Copy link

Description

To improve code modularity, testability, and adherence to the dependency inversion principle, category services where refactored to utilize interfaces.

Related Issue (Link to Github issue)

#367

How Has This Been Tested?

I ran automated and reliable test files that have been pre-written after creating a docker container to simulate the environment. Also used postman to test the endpoints.

Screenshot 2025-03-01 at 9 16 05 PM Screenshot 2025-03-01 at 9 15 42 PM

Screenshots:

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactor

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@@ -40,15 +40,16 @@ func (base *Controller) CreateUser(c *gin.Context) {
return
}

reqData, err := auth.ValidateCreateUserRequest(req, base.Db.Postgresql.DB())
newAuthService := authService.NewAuthService(base.Db.Postgresql.DB())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take this out of here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants