124
Some checks failed
Android Test / validate-and-test (pull_request) Has been cancelled

This commit is contained in:
Bhumi Shah
2025-12-06 16:57:51 +03:00
parent f83af98397
commit 4814b6b1c1
2 changed files with 4 additions and 4 deletions

View File

@@ -52,8 +52,8 @@ public class BookingController {
@PostMapping("/{code}/book")
public ResponseEntity<?> createBooking(
@PathVariable String code,
@RequestParam Long placeId,
@RequestParam String date
@RequestBody Long placeId,
@RequestBody String date
) {
try {
if (placeId == null || date == null || date.isEmpty()) {

View File

@@ -23,14 +23,14 @@ public class EmployeeController {
@Autowired
private EmployeeService employeeService;
@GetMapping("/{code}/auth")
public ResponseEntity<Void> checkAuth(
public ResponseEntity<String> checkAuth(
@PathVariable String code) {
if (code==null){
throw new IllegalArgumentException("Employee code is required");
}
try {
employeeService.getEmployeeByCode(code);
return ResponseEntity.ok().build();
return ResponseEntity.ok("Authorized Employee");
} catch (IllegalArgumentException e) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
} catch (EmployeeNotFoundException e) {