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 { try {
const response = await fetch( const response = await fetch(
`${url_Backend_dwinzo}/api/v1/Thread/addComment`, `${url_Backend_dwinzo}/api/V1/Thread/addComment`,
{ {
method: "POST", method: "POST",
headers: { headers: {

View File

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

View File

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

View File

@@ -13,7 +13,7 @@ export const deleteThreadApi = async (
}; };
try { 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", method: "PATCH",
headers: { headers: {
Authorization: "Bearer <access_token>", Authorization: "Bearer <access_token>",

View File

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

View File

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