mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2026-01-17 12:02:26 +01:00
Merge branch 'main' into 104-exams-in-calendar
# Conflicts: # backend/service/addSchedule.go
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Event } from "../model/event.ts";
|
||||
import { AnonymizedEventDTO } from "../model/event.ts";
|
||||
|
||||
export async function fetchRoom(): Promise<string[]> {
|
||||
const rooms: string[] = [];
|
||||
@@ -16,8 +16,8 @@ export async function fetchEventsByRoomAndDuration(
|
||||
room: string,
|
||||
from_date: string,
|
||||
to_date: string,
|
||||
): Promise<Event[]> {
|
||||
const events: Event[] = [];
|
||||
): Promise<AnonymizedEventDTO[]> {
|
||||
const events: AnonymizedEventDTO[] = [];
|
||||
await fetch(
|
||||
"/api/schedule?room=" + room + "&from=" + from_date + "&to=" + to_date,
|
||||
)
|
||||
@@ -27,7 +27,7 @@ export async function fetchEventsByRoomAndDuration(
|
||||
})
|
||||
.then((eventsResponse) => {
|
||||
console.log("Response:", eventsResponse);
|
||||
eventsResponse.forEach((event: Event) => events.push(event));
|
||||
eventsResponse.forEach((event: AnonymizedEventDTO) => events.push(event));
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Error fetching events: ", error);
|
||||
|
||||
Reference in New Issue
Block a user