Skip to content

Commit

Permalink
separate endpoint for signup
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas957 committed Jun 20, 2024
1 parent 48bf1a3 commit dc7e964
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* This is a Rest Controller for handling signup requests.
* It is mapped to the "api/v1/auth/signup" URL.
*/
@RestController("api/v1/auth/signup")
@RestController
@RequestMapping("api/v1/auth/signup")
public class SignupController {
private final CustomerService customerService;
private final JWTUtil jwtUtil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
authorize
.requestMatchers(HttpMethod.POST,
"/api/v1/customers",
"api/v1/auth/login"
"api/v1/auth/login",
"api/v1/auth/signup"
)
.permitAll()
.requestMatchers(HttpMethod.GET, "/ping")
Expand Down
5 changes: 4 additions & 1 deletion backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ spring:
show_sql: true

main:
web-application-type: servlet
web-application-type: servlet
logging:
level:
org.springframework.security: TRACE

0 comments on commit dc7e964

Please sign in to comment.