Skip to content

Feat: Implementation of use-case for removing a student from a group - #159

Merged
thomasdejaeghere merged 6 commits into
developmentfrom
158-backend---core---removestudentfromgroup---implementation
Mar 9, 2025
Merged

Feat: Implementation of use-case for removing a student from a group#159
thomasdejaeghere merged 6 commits into
developmentfrom
158-backend---core---removestudentfromgroup---implementation

Conversation

@LambrechtMaarten

Copy link
Copy Markdown
Contributor
  • Implemented the use-case to remove a student from a group
  • Added the function removeStudentFromGroup to StudentRepositoryInterface

async execute(input: RemoveStudentFromParams): Promise<object> {
const id: RemoveStudentID = input.fromObject();
await this.removeStudent(id.studentId, id.otherId);
return {};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In delete student I implemented a check if the student that needs to be deleted exist or not by getting the student from the database before deleting it. Is this something that can be added here as well or is it not necessary? (@brentjan if you could give your opinion too please ;) )

@brentjan brentjan Mar 9, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This shouldn't be necessary since in the datasource i already check if a (in my case) teacher exists. @brieromb should also have done this for the student datasource.

@brentjan

brentjan commented Mar 9, 2025

Copy link
Copy Markdown
Contributor

I made a new issue (#176) that will implement the new method in the repository!

@thomasdejaeghere
thomasdejaeghere merged commit 225c896 into development Mar 9, 2025
@thomasdejaeghere
thomasdejaeghere deleted the 158-backend---core---removestudentfromgroup---implementation branch March 9, 2025 19:37
@thomasdejaeghere thomasdejaeghere added the enhancement New feature or request label Mar 9, 2025
@thomasdejaeghere thomasdejaeghere added this to the Milestone 1 milestone Mar 9, 2025
@thomasdejaeghere thomasdejaeghere linked an issue Mar 9, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] - Core - RemoveStudentFromGroup - Implementation

3 participants