forked from szumik/Lab2
Compare commits
2 Commits
c1b88a902e
...
new_featur
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6adfd17a45 | ||
| cadbafe85a |
@@ -1,2 +1,3 @@
|
||||
To jest projekt z Lab1.
|
||||
To jest kolejna linijka w readme.
|
||||
To jest kolejna linijka w readme.
|
||||
Kolejna zmiana w pliku.
|
||||
@@ -0,0 +1,28 @@
|
||||
@RestController
|
||||
clsass UserController {
|
||||
|
||||
@GetMapping("/users")
|
||||
public List<User> getAllUsers() {
|
||||
// Logic to retrieve all users
|
||||
}
|
||||
|
||||
@PostMapping("/users")
|
||||
public User createUser(@RequestBody User user) {
|
||||
// Logic to create a new user
|
||||
}
|
||||
|
||||
@GetMapping("/users/{id}")
|
||||
public User getUserById(@PathVariable Long id) {
|
||||
// Logic to retrieve a user by ID
|
||||
}
|
||||
|
||||
@PutMapping("/users/{id}")
|
||||
public User updateUser(@PathVariable Long id, @RequestBody User user) {
|
||||
// Logic to update a user by ID
|
||||
}
|
||||
|
||||
@DeleteMapping("/users/{id}")
|
||||
public void deleteUser(@PathVariable Long id) {
|
||||
// Logic to delete a user by ID
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user