feat: implement complex selection flow
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type {
|
||||
AdminBooking,
|
||||
Complex,
|
||||
ComplexWithRole,
|
||||
Court,
|
||||
CreateAdminBookingInput,
|
||||
CreateComplexPayload,
|
||||
@@ -20,6 +21,7 @@ import type {
|
||||
PublicAvailabilityResponse,
|
||||
PublicBooking,
|
||||
PublicBookingConfirmation,
|
||||
SelectComplexInput,
|
||||
Sport,
|
||||
UpdateAdminBookingStatusInput,
|
||||
UpdateComplexPayload,
|
||||
@@ -187,7 +189,17 @@ export const apiClient = {
|
||||
return response.data;
|
||||
},
|
||||
listMine: async () => {
|
||||
const response = await http.get<Complex[]>('/api/complexes/mine');
|
||||
const response = await http.get<ComplexWithRole[]>('/api/complexes/mine');
|
||||
return response.data;
|
||||
},
|
||||
getCurrent: async () => {
|
||||
const response = await http.get<ComplexWithRole | null>('/api/complexes/me');
|
||||
return response.data;
|
||||
},
|
||||
select: async (payload: SelectComplexInput) => {
|
||||
const response = await http.post<ComplexWithRole>('/api/complexes/select', JSON.stringify(payload), {
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
});
|
||||
return response.data;
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user