update
This commit is contained in:
@@ -5,6 +5,7 @@ import type {
|
||||
Veranstaltung,
|
||||
GroupInfo,
|
||||
CreateVeranstaltungInput,
|
||||
ConflictEvent,
|
||||
} from '../types/events.types';
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -153,4 +154,13 @@ export const eventsApi = {
|
||||
.post<ApiResponse<{ created: number; errors: string[] }>>('/api/events/import', { events })
|
||||
.then((r) => r.data.data);
|
||||
},
|
||||
|
||||
/** Check for overlapping events in a time range */
|
||||
checkConflicts(from: string, to: string, excludeId?: string): Promise<ConflictEvent[]> {
|
||||
return api
|
||||
.get<ApiResponse<ConflictEvent[]>>('/api/events/conflicts', {
|
||||
params: { from, to, ...(excludeId ? { excludeId } : {}) },
|
||||
})
|
||||
.then((r) => r.data.data);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user