Update API endpoints to use consistent versioning in URL paths

This commit is contained in:
2025-06-24 12:32:45 +05:30
parent a562a51025
commit 17ec72e283
6 changed files with 6 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ export const addCommentsApi = async (
);
try {
const response = await fetch(
`${url_Backend_dwinzo}/api/v1/Thread/addComment`,
`${url_Backend_dwinzo}/api/V1/Thread/addComment`,
{
method: "POST",
headers: {

View File

@@ -9,7 +9,7 @@ export const createThreadApi = async (
versionId?: string
) => {
try {
const response = await fetch(`${url_Backend_dwinzo}/api/v1/upsetThread`, {
const response = await fetch(`${url_Backend_dwinzo}/api/V1/upsetThread`, {
method: "POST",
headers: {
Authorization: "Bearer <access_token>",

View File

@@ -16,7 +16,7 @@ export const deleteCommentApi = async (
try {
const response = await fetch(
`${url_Backend_dwinzo}/api/v1/Thread/deleteComment`,
`${url_Backend_dwinzo}/api/V1/Thread/deleteComment`,
{
method: "PATCH",
headers: {

View File

@@ -13,7 +13,7 @@ export const deleteThreadApi = async (
};
try {
const response = await fetch(`${url_Backend_dwinzo}/api/v1/Thread/delete`, {
const response = await fetch(`${url_Backend_dwinzo}/api/V1/Thread/delete`, {
method: "PATCH",
headers: {
Authorization: "Bearer <access_token>",

View File

@@ -16,7 +16,7 @@ export const editThreadTitleApi = async (
try {
const response = await fetch(
`${url_Backend_dwinzo}/api/v1/Thread/updateTitle`,
`${url_Backend_dwinzo}/api/V1/Thread/updateTitle`,
{
method: "PATCH",
headers: {

View File

@@ -1,10 +1,9 @@
let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_URL}`;
export const getAllThreads = async (projectId: string, versionId: string) => {
try {
const response = await fetch(
`${url_Backend_dwinzo}/api/v1/Threads/${projectId}/${versionId}`,
`${url_Backend_dwinzo}/api/V1/Threads/${projectId}/${versionId}`,
{
method: "GET",
headers: {