Refactor collaboration APIs to include versionId in relevant functions and clean up commented code
This commit is contained in:
@@ -5,7 +5,8 @@ export const createThreadApi = async (
|
||||
state: string,
|
||||
position: any,
|
||||
rotation: any,
|
||||
threadTitle: any
|
||||
threadTitle: any,
|
||||
versionId?: string
|
||||
) => {
|
||||
try {
|
||||
const response = await fetch(`${url_Backend_dwinzo}/api/v1/upsetThread`, {
|
||||
@@ -16,13 +17,20 @@ export const createThreadApi = async (
|
||||
token: localStorage.getItem("token") || "",
|
||||
refresh_token: localStorage.getItem("refreshToken") || "",
|
||||
},
|
||||
body: JSON.stringify({ projectId, state, position, rotation, threadTitle }),
|
||||
body: JSON.stringify({
|
||||
projectId,
|
||||
state,
|
||||
position,
|
||||
rotation,
|
||||
threadTitle,
|
||||
versionId,
|
||||
}),
|
||||
});
|
||||
if (!response.ok) {
|
||||
console.error("Failed to add project");
|
||||
}
|
||||
const result = await response.json();
|
||||
console.log('result: ', result);
|
||||
console.log("result: ", result);
|
||||
return result;
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
|
||||
Reference in New Issue
Block a user