updated
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_URL}`;
|
||||
|
||||
export const getLines = async (organization: string,projectId?:string) => {
|
||||
export const getLines = async (organization: string, projectId?: string, versionId?: string) => {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`${url_Backend_dwinzo}/api/V1/lines/${projectId}`,
|
||||
`${url_Backend_dwinzo}/api/V1/lines/${projectId}/${versionId}`,
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
@@ -25,9 +25,9 @@ export const getLines = async (organization: string,projectId?:string) => {
|
||||
} catch (error) {
|
||||
echo.error("Failed to get Lines");
|
||||
if (error instanceof Error) {
|
||||
throw new Error(error.message);
|
||||
console.log(error.message);
|
||||
} else {
|
||||
throw new Error("An unknown error occurred");
|
||||
console.log("An unknown error occurred");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user