Add api path prefix into screenshots and title (#1557)

This commit is contained in:
Shuchang Zheng
2025-01-15 02:20:00 -08:00
committed by GitHub
parent 518605b91a
commit d905a8d4b9
5 changed files with 19 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ import { useQuery } from "@tanstack/react-query";
import { getImageURL } from "./artifactUtils";
import { ReloadIcon } from "@radix-ui/react-icons";
import { statusIsNotFinalized } from "../types";
import { apiPathPrefix } from "@/util/env";
type Props = {
stepId: string;
@@ -25,7 +26,7 @@ function ActionScreenshot({ stepId, index, taskStatus }: Props) {
queryFn: async () => {
const client = await getClient(credentialGetter);
return client
.get(`/step/${stepId}/artifacts`)
.get(`${apiPathPrefix}/step/${stepId}/artifacts`)
.then((response) => response.data);
},
refetchInterval: (query) => {