Spaces:
Configuration error
Configuration error
| package com.example.app.controllers; | |
| import org.springframework.web.bind.annotation.DeleteMapping; | |
| import org.springframework.web.bind.annotation.PathVariable; | |
| 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; | |
| import com.example.app.dtos.UserAccountCreationDto; | |
| import com.example.app.services.UserAccountService; | |
| import lombok.RequiredArgsConstructor; | |
| public class UserAccountController { | |
| private final UserAccountService userAccountService; | |
| public Long save( UserAccountCreationDto dto) { | |
| return userAccountService.save(dto).getId(); | |
| } | |
| public void deleteById( Long id) { | |
| userAccountService.deleteById(id); | |
| } | |
| } | |