2 Commits

Author SHA1 Message Date
MikolajSzuper
6adfd17a45 Changes in UserController 2025-10-21 13:49:57 +02:00
cadbafe85a Update Readme.txt 2025-10-21 11:29:13 +00:00
3 changed files with 30 additions and 2 deletions

View File

@@ -1,2 +1,3 @@
To jest projekt z Lab1.
To jest kolejna linijka w readme.hbjkh
To jest kolejna linijka w readme.
Kolejna zmiana w pliku.

View File

@@ -12,7 +12,6 @@ public class DemoApplication {
System.out.println("Third line added");
System.out.println(new Date());
SpringApplication.run(DemoApplication.class, args);
System.out.println("Dodalem zmiany Hubi0295 na repo szumik");
}
}

View File

@@ -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
}
}