ugent-library / old-people-service

People service
Apache License 2.0
0 stars 0 forks source link

[Student import] Move business logic to repositories #28

Closed netsensei closed 1 year ago

netsensei commented 1 year ago

Story

The code in cmd/import_student.go should only contain minimal control logic for input / output. Business logic needs to be moved into relevant repositories in the repository/ directory. This improves code flexibility and maintainability.

Success criteria

Implementation suggestion

The scope of this issue is limited to moving existing code in cmd/import_student.go to repositories from where it is called. Not refactoring the code itself.

A great example of how the code should look is deliver/cli/files_cmd.go. The command just instantiates the repositories, calls an iterator and then methods on repositories.

Automatic testing scenario

n/a

Additional information

n/a

Related issues

nicolasfranck commented 1 year ago

fixed by https://github.com/ugent-library/people-service/pull/48