@@ -57,7 +57,7 @@ export const expenseAPI = {
5757 splitType : data . splitType ,
5858 splitData : data . splitData ,
5959 } ;
60- endpoint = '/api/v1 /expenses/group' ;
60+ endpoint = '/api/v2 /expenses/group' ;
6161 } else {
6262 expenseData = {
6363 title : data . title ,
@@ -66,7 +66,7 @@ export const expenseAPI = {
6666 date : data . date ,
6767 memo : data . memo ,
6868 } ;
69- endpoint = '/api/v1 /expenses/personal' ;
69+ endpoint = '/api/v2 /expenses/personal' ;
7070 }
7171
7272 formData . append ( 'expense' , new Blob ( [ JSON . stringify ( expenseData ) ] , {
@@ -91,7 +91,7 @@ export const expenseAPI = {
9191 year : number ;
9292 month : number ;
9393 } ) => {
94- const response = await apiClient . get ( '/api/v1 /expenses/group/shares' , { params } ) ;
94+ const response = await apiClient . get ( '/api/v2 /expenses/group/shares' , { params } ) ;
9595 return response . data ;
9696 } ,
9797
@@ -104,7 +104,7 @@ export const expenseAPI = {
104104 category ?: string ;
105105 search ?: string ;
106106 } ) => {
107- const response = await apiClient . get ( `/api/v1 /expenses/group/${ groupId } /shares/paging` , { params } ) ;
107+ const response = await apiClient . get ( `/api/v2 /expenses/group/${ groupId } /shares/paging` , { params } ) ;
108108 return response . data ;
109109 } ,
110110
@@ -117,7 +117,7 @@ export const expenseAPI = {
117117 category ?: string ;
118118 search ?: string ;
119119 } ) => {
120- const response = await apiClient . get ( '/api/v1 /expenses/personal/combined' , { params} ) ;
120+ const response = await apiClient . get ( '/api/v2 /expenses/personal/combined' , { params} ) ;
121121 return response . data ;
122122 } ,
123123
@@ -130,7 +130,7 @@ export const expenseAPI = {
130130 category ?: string ;
131131 search ?: string ;
132132 } ) => {
133- const response = await apiClient . get ( `/api/v1 /expenses/group/${ groupId } /with-stats` , { params} ) ;
133+ const response = await apiClient . get ( `/api/v2 /expenses/group/${ groupId } /with-stats` , { params} ) ;
134134 return response . data ;
135135 } ,
136136
@@ -157,7 +157,7 @@ export const expenseAPI = {
157157 formData . append ( 'receiptFile' , data . receipt ) ;
158158 }
159159
160- const response = await apiClient . patch ( `/api/v1 /expenses/${ id } ` , formData , {
160+ const response = await apiClient . patch ( `/api/v2 /expenses/${ id } ` , formData , {
161161 headers : {
162162 'Content-Type' : 'multipart/form-data'
163163 }
@@ -167,19 +167,19 @@ export const expenseAPI = {
167167
168168 // 지출 삭제
169169 delete : async ( id : number ) => {
170- const response = await apiClient . delete ( `/api/v1 /expenses/${ id } ` ) ;
170+ const response = await apiClient . delete ( `/api/v2 /expenses/${ id } ` ) ;
171171 return response . data ;
172172 } ,
173173
174174 // 영수증 URL 조회
175175 getReceiptUrl : async ( id : number ) => {
176- const response = await apiClient . get ( `/api/v1 /expenses/${ id } /receipt` ) ;
176+ const response = await apiClient . get ( `/api/v2 /expenses/${ id } /receipt` ) ;
177177 return response . data ;
178178 } ,
179179
180180 // 영수증만 삭제
181181 deleteReceipt : async ( id : number ) => {
182- const response = await apiClient . delete ( `/api/v1 /expenses/${ id } /receipt` ) ;
182+ const response = await apiClient . delete ( `/api/v2 /expenses/${ id } /receipt` ) ;
183183 return response . data ;
184184 } ,
185185
@@ -190,7 +190,7 @@ export const expenseAPI = {
190190 months ?: number ;
191191 category ?: string ;
192192 } ) => {
193- const response = await apiClient . get ( '/api/v1 /expenses/personal/trend' , { params } ) ;
193+ const response = await apiClient . get ( '/api/v2 /expenses/personal/trend' , { params } ) ;
194194 return response . data ;
195195 } ,
196196
@@ -201,7 +201,7 @@ export const expenseAPI = {
201201 months ?: number ;
202202 category ?: string ;
203203 } ) => {
204- const response = await apiClient . get ( `/api/v1 /expenses/group/${ groupId } /trend` , { params } ) ;
204+ const response = await apiClient . get ( `/api/v2 /expenses/group/${ groupId } /trend` , { params } ) ;
205205 return response . data ;
206206 } ,
207207
0 commit comments