gthdst ghfdrb
This commit is contained in:
@@ -37,17 +37,17 @@ public class BarController {
|
||||
return unitRepository.findAll();
|
||||
}
|
||||
|
||||
@GetMapping("glass")
|
||||
@GetMapping("/glass")
|
||||
public List<String> getGlass() {
|
||||
return Arrays.stream(Glass.values()).map(Glass::getName).toList();
|
||||
}
|
||||
|
||||
@GetMapping("category")
|
||||
@GetMapping("/category")
|
||||
public List<String> getCategory() {
|
||||
return Arrays.stream(Category.values()).map(Category::getName).toList();
|
||||
}
|
||||
|
||||
@GetMapping("receipt")
|
||||
@GetMapping("/receipt")
|
||||
public List<ReceiptResponseDto> getReceipt(@RequestParam("id") Long id) {
|
||||
return sessionService.getReceiptList(id);
|
||||
}
|
||||
@@ -56,18 +56,12 @@ public class BarController {
|
||||
public VisitorResponseDto getMe() {
|
||||
Visitor visitor = visitorService.getCurrentVisitor();
|
||||
String role;
|
||||
Boolean invited;
|
||||
boolean active;
|
||||
role = UserRole.ADMIN.toString();
|
||||
invited = true;
|
||||
active = true;
|
||||
VisitorResponseDto dto = VisitorResponseDto.mapToDto(visitor, invited, role, active);
|
||||
log.info("Запрос информации о пользователе: {}-{} {}, вошел в бар{},в роли {}",
|
||||
VisitorResponseDto dto = VisitorResponseDto.mapToDto(visitor, true, role, true);
|
||||
log.info("Запрос информации о пользователе: {}-{} {}, вошел в бар",
|
||||
dto.getId(),
|
||||
dto.getName().strip(),
|
||||
dto.getLastName() != null ? dto.getLastName().strip() : "",
|
||||
invited ? "" : "не ",
|
||||
role);
|
||||
dto.getLastName() != null ? dto.getLastName().strip() : "");
|
||||
return dto;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user