Skip to content

Commit

Permalink
fix: 영수증 업로드 및 삭제 예외처리
Browse files Browse the repository at this point in the history
  • Loading branch information
toothlessdev committed Jun 22, 2024
1 parent aeab21a commit 4f5a2da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/services/receipt/receipt.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ export const receiptService = {
},

updateReceipt: async (receiptId: number, body: IUpdateReceiptRequest) => {
if (receiptId === undefined) throw new Error("ReceiptId is Undefined!");

const response = await api.put(`/receipts/${receiptId}`, body);
return response.data;
},

deleteReceipt: async (receiptId: number) => {
if (receiptId === undefined) throw new Error("ReceiptId is Undefined!");

const response = await api.delete(`/receipts/${receiptId}`);
return response.data;
},
Expand Down

0 comments on commit 4f5a2da

Please sign in to comment.