Update API endpoints to use consistent versioning in URL paths
This commit is contained in:
@@ -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: {
|
||||||
|
|||||||
@@ -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>",
|
||||||
|
|||||||
@@ -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: {
|
||||||
|
|||||||
@@ -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>",
|
||||||
|
|||||||
@@ -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: {
|
||||||
|
|||||||
@@ -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: {
|
||||||
|
|||||||
Reference in New Issue
Block a user