Spaces:
Configuration error
Configuration error
Download src/main/java/com/example/app/controllers/UserAccountController.java from variphx/java-learn: direct link, hf CLI and curl.
- Browser
- Download file 987 Bytes
-
https://huggingface.co/spaces/variphx/java-learn/resolve/b58280e7c2632037a26de4de11d6d1712ac66837/src/main/java/com/example/app/controllers/UserAccountController.java
- Command line
-
hf download hf://spaces/variphx/java-learn@b58280e7c2632037a26de4de11d6d1712ac66837/src/main/java/com/example/app/controllers/UserAccountController.java
-
curl -L -o UserAccountController.java https://huggingface.co/spaces/variphx/java-learn/resolve/b58280e7c2632037a26de4de11d6d1712ac66837/src/main/java/com/example/app/controllers/UserAccountController.java
987 Bytes
| 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); | |
| } | |
| } | |