public void deleteStudent(Long studentId) {
if(!studentRepository.existsById(studentId)) {
throw new StudentNotFoundException(
"Student with id " + studentId + " does not exists");
}
studentRepository.deleteById(studentId);
}
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)