Skip to content

Commit 0ca2bae

Browse files
author
simon
committed
comments
1 parent 07c3f1b commit 0ca2bae

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

src/main/java/com/themetalstorm/bibliothekssystem/controller/GenreController.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ public ResponseEntity<GenreDTO> updateGenre(@PathVariable int id, @RequestBody G
4747
return ResponseEntity.ok(genreService.updateGenre(id, genreDTO));
4848
}
4949

50-
//TODO: PUT
51-
5250
@PreAuthorize("hasRole('ROLE_ADMIN')")
5351
@DeleteMapping("/{id}")
5452
ResponseEntity<Void> deleteGenreById(@PathVariable int id) {

src/main/java/com/themetalstorm/bibliothekssystem/controller/UserController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public ResponseEntity<User> getUserById(@PathVariable int id){
3939
return new ResponseEntity<>(userService.getUserById(id), HttpStatus.OK);
4040
}
4141

42+
//TODO: move logic to service
4243
@PostMapping("/register")
4344
public ResponseEntity<User> registerUser(@RequestBody User user)
4445
{

src/main/java/com/themetalstorm/bibliothekssystem/service/AuthorService.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ public AuthorDTO updateAuthor(int id, AuthorDTO authorDTO) {
7777
return new AuthorDTO(authorRepository.save(author));
7878
}
7979

80-
//TODO: PUT
81-
8280
public void deleteById(int id) {
8381
Author author = authorRepository.findById(id).orElseThrow(() -> new ResourceAlreadyExistsException("Author not found with id: " + id));
8482
authorRepository.delete(author);

0 commit comments

Comments
 (0)