Add room create progress debug headers
All checks were successful
build-and-deploy / build-deploy (push) Successful in 26s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 26s
This commit is contained in:
@@ -173,6 +173,7 @@ class Rooms(
|
||||
if (debugAuth == "1") {
|
||||
response.setHeader("X-Principal-Present", (principal != null).toString())
|
||||
response.setHeader("X-Principal-Id", principal?.userId?.toString() ?: "none")
|
||||
response.setHeader("X-Room-Create-Step", "start")
|
||||
}
|
||||
requirePrincipal(principal)
|
||||
try {
|
||||
@@ -184,6 +185,9 @@ class Rooms(
|
||||
}
|
||||
throw ex
|
||||
}
|
||||
if (debugAuth == "1") {
|
||||
response.setHeader("X-Room-Create-Step", "member_ok")
|
||||
}
|
||||
|
||||
if (roomRepo.existsByPropertyIdAndRoomNumber(propertyId, request.roomNumber)) {
|
||||
throw ResponseStatusException(HttpStatus.CONFLICT, "Room number already exists for property")
|
||||
@@ -206,6 +210,9 @@ class Rooms(
|
||||
)
|
||||
|
||||
val saved = roomRepo.save(room).toRoomResponse()
|
||||
if (debugAuth == "1") {
|
||||
response.setHeader("X-Room-Create-Step", "saved")
|
||||
}
|
||||
roomBoardEvents.emit(propertyId)
|
||||
return saved
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user