Add id check for booking

It now checks if sales_person_id and slot_id actually exists.
This commit is contained in:
Simon Goller 2024-05-09 08:11:38 +02:00
parent 418a2944f7
commit bc8a534353
10 changed files with 201 additions and 24 deletions

View file

@ -23,6 +23,8 @@ type BookingService = service_impl::booking::BookingServiceImpl<
PermissionService,
ClockService,
UuidService,
SalesPersonService,
SlotService,
>;
#[derive(Clone)]
@ -31,7 +33,6 @@ pub struct RestStateImpl {
slot_service: Arc<SlotService>,
sales_person_service: Arc<SalesPersonService>,
booking_service: Arc<BookingService>,
}
impl rest::RestStateDef for RestStateImpl {
type PermissionService = PermissionService;
@ -90,6 +91,8 @@ impl RestStateImpl {
permission_service.clone(),
clock_service,
uuid_service,
sales_person_service.clone(),
slot_service.clone(),
));
Self {
permission_service,