diff --git a/src/api/flatastic.ts b/src/api/flatastic.ts index 0cc59ff..3d75268 100644 --- a/src/api/flatastic.ts +++ b/src/api/flatastic.ts @@ -5,7 +5,7 @@ class Flatastic { this.apikey = apikey; } - async request(url: string, option: any) { + async request(url: stringany) { const headers = { accept: "application/json, text/plain, */*", "accept-language": @@ -20,10 +20,8 @@ class Flatastic { "x-client-version": "2.3.20", }; const response = await fetch(url, { - ...option, headers: { ...headers, - ...option.headers, }, }); if (!response.ok) { @@ -35,19 +33,15 @@ class Flatastic { getShoppingList() { return this.request( "https://api.flatastic-app.com/index.php/api/shoppinglist", - {}, ); } getTaskList() { - return this.request( - "https://api.flatastic-app.com/index.php/api/chores", - {}, - ); + return this.request("https://api.flatastic-app.com/index.php/api/chores"); } getInformation() { - this.request("https://api.flatastic-app.com/index.php/api/wg", {}); + return this.request("https://api.flatastic-app.com/index.php/api/wg"); } } diff --git a/src/components/Timetable/Timetable.tsx b/src/components/Timetable/Timetable.tsx index b467c4e..99dd727 100644 --- a/src/components/Timetable/Timetable.tsx +++ b/src/components/Timetable/Timetable.tsx @@ -1,8 +1,7 @@ import { useEffect } from "react"; -import TimetableRow from "../TimetableRow/TimetableRow"; +import TimetableRow from "@/components/TimetableRow/TimetableRow"; -import _ from "lodash"; import { useKVVStore } from "@/store/kvv"; import type { DepartureType } from "@/types/departureType"; @@ -39,6 +38,7 @@ export default function Timetable() {