Skip to content

Commit

Permalink
refactor: Change acceptCode method
Browse files Browse the repository at this point in the history
  • Loading branch information
arturhasparian committed Feb 20, 2024
1 parent b844b39 commit 732f447
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.sellbycar.marketplace.user;

import com.sellbycar.marketplace.auth.ActivateRequest;
import com.sellbycar.marketplace.auth.JwtUtils;
import com.sellbycar.marketplace.auth.LoginRequest;
import com.sellbycar.marketplace.web.ResponseBody;
Expand Down Expand Up @@ -125,8 +126,8 @@ public ResponseEntity<?> forgotPassword(@RequestBody ForgotPasswordRequest reque
@ApiResponse(responseCode = "200", description = "Ok"),
@ApiResponse(responseCode = "400", description = "Bad request")
})
public ResponseEntity<?> acceptCode(@PathVariable("code") String code) {
var userDTO = userService.resetUniqueCode(code);
public ResponseEntity<?> acceptCode(@RequestBody ActivateRequest request) {
var userDTO = userService.resetUniqueCode(request.getCode());
return ResponseUtil.create("Ok", HttpStatus.OK, userDTO);
}

Expand Down

0 comments on commit 732f447

Please sign in to comment.