Skip to content

Commit fe68c92

Browse files
committed
build service. response addapted
1 parent 7e3c319 commit fe68c92

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/pages/ProjectPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ const ProjectPage = () => {
8585

8686
useEffect(() => {
8787
if (selectedBuildId) {
88-
buildsService.getTestRuns(selectedBuildId).then((testRuns: TestRun[]) => {
89-
setTestRuns(testRuns);
88+
buildsService.get(selectedBuildId).then((build) => {
89+
setTestRuns(build.testRuns);
9090
});
9191
}
9292
}, [selectedBuildId]);

src/services/builds.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { TestRun } from "../types";
1+
import { Build } from "../types";
22
import { handleResponse, authHeader } from "../_helpers/service.helpers";
33
import { API_URL } from "../_config/api.config";
44

55
export const buildsService = {
6-
getTestRuns,
6+
get,
77
remove,
88
};
99

10-
function getTestRuns(id: string): Promise<TestRun[]> {
10+
function get(id: string): Promise<Build> {
1111
const requestOptions = {
1212
method: "GET",
1313
headers: authHeader(),

0 commit comments

Comments
 (0)