Skip to content

Commit

Permalink
remove souts
Browse files Browse the repository at this point in the history
  • Loading branch information
nora-kauczor committed Nov 19, 2024
1 parent 291074f commit fe47729
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public Vocab createAndActivateVocab(@RequestBody VocabDTOCreate vocabDTO, @Authe

@PutMapping
public Vocab editVocab(@RequestBody VocabDTOEdit editedVocab, @AuthenticationPrincipal OAuth2User user) throws IdNotFoundException, VocabIsNotEditableException {
System.out.println(editedVocab);
return vocabService.editVocab(editedVocab, user.getName());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ public Vocab createAndActivateVocab(VocabDTOCreate vocabDTO, String userName) th
}

public Vocab editVocab(VocabDTOEdit vocabDTO, String userName) throws IdNotFoundException, VocabIsNotEditableException {
System.out.println("editVocab was called in VocabService");
System.out.println("VocabDTO: "+vocabDTO);
System.out.println("userName: "+userName);
Vocab vocab = vocabRepo.findById(vocabDTO.id()).orElseThrow(() -> new IdNotFoundException("ID not found."));
if (!vocab.getCreatedBy().equals(userName)) {
throw new VocabIsNotEditableException("Method not allowed.");
Expand Down

0 comments on commit fe47729

Please sign in to comment.