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 FunctionService from singleton to class #142

Open
wants to merge 1 commit into
base: extract-auth
Choose a base branch
from

Conversation

oddsund
Copy link
Collaborator

@oddsund oddsund commented Mar 11, 2025

Beskrivelse

🥅 Mål med PRen: Løsne den harde koblingen mellom FunctionService og FunctionRoutes, samt gjøre koden lettere å teste uten biblioteker

Løsning

🆕 Endring: FunctionService er nå endret til en klasse som implementerer et interface. Ved å gjøre FunctionRoutes avhengig av interfacet, istedenfor klassen, kan vi enkelt mocke den for testene uten å måtte bruke biblioteker og FunctionRoutes har ikke lenger den harde knytningen til FunctionService implementasjonen.

Flyttet også dto'ene til egen mappe, slik at det er tydeligere hvor de ligger.

🧪 Testing

Er det noe spesielt den som reviewer PRen bør sjekke?

🔒 Sikkerhet / Trusselvurdering

  • Er det potensielle risikoer knyttet til endringen?
  • Trengs det noen sikkerhetstiltak eller ytterligere vurderinger?

@halvparten
Copy link
Collaborator

digg

Base automatically changed from refactor-database to staging March 11, 2025 12:32
@oddsund oddsund force-pushed the functionservice-refactor branch 2 times, most recently from dd3dc45 to 4b3057b Compare March 14, 2025 14:00
@oddsund oddsund force-pushed the functionservice-refactor branch from 4b3057b to 82e1935 Compare March 14, 2025 14:02
@oddsund oddsund changed the base branch from staging to extract-auth March 14, 2025 14:20
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.

3 participants