Skip to content

Commit

Permalink
clean code
Browse files Browse the repository at this point in the history
Co-Authored-By: Moritz Reich <[email protected]>
  • Loading branch information
jantiegges and n3rdc4ptn committed Feb 6, 2023
1 parent dd03523 commit 3356581
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/deskstar-frontend/lib/api/ResourceService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export async function getBuildings(session: Session): Promise<IBuilding[]> {
headers: {
Authorization: `Bearer ${session.accessToken}`,
},
cache: "no-cache",
});

if (!response.ok) throw Error(`${response.status} ${response.statusText}`);
Expand Down Expand Up @@ -180,7 +179,6 @@ export async function getDesks(
headers: {
Authorization: `Bearer ${session.accessToken}`,
},
cache: "no-cache",
}
);
} else {
Expand All @@ -190,17 +188,13 @@ export async function getDesks(
headers: {
Authorization: `Bearer ${session.accessToken}`,
},

cache: "no-cache",
}
);
}

if (!response.ok) throw Error(`${response.status} ${response.statusText}`);

const data = await response.json();
console.log(data.length);

return data;
}

Expand Down Expand Up @@ -313,7 +307,6 @@ export async function updateBuilding(
message: body || "An error occured.",
};
} else {
console.log(body);
result = {
response: ResourceResponse.Success,
data: JSON.parse(body) as IBuilding,
Expand Down Expand Up @@ -349,7 +342,6 @@ export async function updateFloor(
message: body || "An error occured.",
};
} else {
console.log(body);
result = {
response: ResourceResponse.Success,
data: JSON.parse(body) as IFloor,
Expand Down Expand Up @@ -385,7 +377,6 @@ export async function updateRoom(
message: body || "An error occured.",
};
} else {
console.log(body);
const parsed = JSON.parse(body);
const room = parsed as IRoom;
room.building = parsed["buildingName"];
Expand Down Expand Up @@ -425,7 +416,6 @@ export async function updateDesk(
message: body || "An error occured.",
};
} else {
console.log(body);
const parsed = JSON.parse(body);
const desk = parsed as IDesk;
desk.deskTyp = parsed["deskTypeName"];
Expand Down Expand Up @@ -464,7 +454,6 @@ export async function updateDeskType(
message: body || "An error occured.",
};
} else {
console.log(body);
result = {
response: ResourceResponse.Success,
data: JSON.parse(body) as IDeskType,
Expand Down

0 comments on commit 3356581

Please sign in to comment.