skip to Main Content

Php – Unable to use a custom ValueResolver

I'm developing a Symfony 7 REST API. I'm following the official docs to implement a custom argument resolver to handle mapping of the request payload format that my endpoints are receiving to DTOs (https://symfony.com/doc/current/controller/value_resolver.html#adding-a-custom-value-resolver). Here's an example of a request…

VIEW QUESTION

Reactjs – can someone help me understand why my api is not working?

So i have this register api created @PostMapping("/register") public ResponseEntity<String> register(@RequestBody RegisterRequest registerRequest){ if (userRepository.findByEmail(registerRequest.getEmail())!=null){ return new ResponseEntity<>("Email already exist",HttpStatus.BAD_REQUEST); } User user = new User(); user.setEmail(registerRequest.getEmail()); user.setName(registerRequest.getName()); user.setLastName(registerRequest.getLastName()); user.setPassword(passwordEncoder.encode(registerRequest.getPassword())); userRepository.save(user); authenticationManager.authenticate( new UsernamePasswordAuthenticationToken(registerRequest.getEmail(), registerRequest.getPassword()) ); return new ResponseEntity<>(jwtUtil.generateToken( registerRequest.getEmail(),…

VIEW QUESTION
Back To Top
Search