Add versioning support to collaboration features and API calls
- Adjust logic in socket responses to handle versioning for comments and threads.
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_URL}`;
|
||||
// let url_Backend_dwinzo = `http://192.168.0.102:5000`;
|
||||
|
||||
export const deleteThreadApi = async (projectId: string, threadId: string) => {
|
||||
export const deleteThreadApi = async (
|
||||
projectId: string,
|
||||
threadId: string,
|
||||
versionId: string
|
||||
) => {
|
||||
const body: any = {
|
||||
projectId,
|
||||
threadId,
|
||||
versionId,
|
||||
};
|
||||
|
||||
try {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_URL}`;
|
||||
|
||||
export const getAllThreads = async (projectId: string) => {
|
||||
export const getAllThreads = async (projectId: string, versionId: string) => {
|
||||
console.log("projectId: ", projectId, versionId);
|
||||
try {
|
||||
const response = await fetch(
|
||||
`${url_Backend_dwinzo}/api/v1/Threads/${projectId}`,
|
||||
`${url_Backend_dwinzo}/api/v1/Threads/${projectId}/${versionId}`,
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
@@ -21,7 +22,6 @@ export const getAllThreads = async (projectId: string) => {
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
console.log('result: ', result);
|
||||
|
||||
return result;
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user