Skip to content

Commit

Permalink
delete unused endpoint (#398)
Browse files Browse the repository at this point in the history
* delete unused endpoint

* delete unused endpoint's test
  • Loading branch information
holotsvan authored Sep 24, 2024
1 parent bec87c4 commit f54458c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
18 changes: 0 additions & 18 deletions core/src/main/java/greencity/controller/UserController.java
Original file line number Diff line number Diff line change
Expand Up @@ -819,24 +819,6 @@ public ResponseEntity<List<Long>> deactivateAllUsers(@RequestBody List<Long> lis
return ResponseEntity.status(HttpStatus.OK).body(userService.deactivateAllUsers(listId));
}

/**
* Method that allow you to save new {@link UserVO}.
*
* @param userVO for save User
* @author Orest Mamchuk
*/
@Operation(summary = "Save User")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = HttpStatuses.OK),
@ApiResponse(responseCode = "400", description = HttpStatuses.BAD_REQUEST),
@ApiResponse(responseCode = "401", description = HttpStatuses.UNAUTHORIZED),
@ApiResponse(responseCode = "403", description = HttpStatuses.FORBIDDEN),
})
@PostMapping()
public ResponseEntity<UserVO> saveUser(@RequestBody @CurrentUser UserVO userVO) {
return ResponseEntity.status(HttpStatus.OK).body(userService.save(userVO));
}

/**
* Method that allow to search users by several values.
*
Expand Down
12 changes: 0 additions & 12 deletions core/src/test/java/greencity/controller/UserControllerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -702,18 +702,6 @@ void activateUser() throws Exception {
verify(userService).markUserAsActivated(uuid);
}

@Test
void saveUserTest() throws Exception {
when(userService.save(ModelUtils.getUserVO())).thenReturn(ModelUtils.getUserVO());
mockMvc.perform(post(userLink)
.contentType(MediaType.APPLICATION_JSON)
.content(objectMapper.writeValueAsString(ModelUtils.getUserVO())))
.andExpect(status().isOk())
.andExpect(jsonPath("$.id").value(1L))
.andExpect(jsonPath("$.name").value(TestConst.NAME))
.andExpect(jsonPath("$.email").value(TestConst.EMAIL));
}

@Test
void findAllByEmailNotificationTest() throws Exception {
EmailNotification notification = EmailNotification.DAILY;
Expand Down

0 comments on commit f54458c

Please sign in to comment.