format code

This commit is contained in:
2025-07-25 01:10:00 +02:00
parent 3bcd2e16a2
commit d08290ce3d
5 changed files with 14 additions and 12 deletions

View File

@@ -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");
}
}