Skip to content

Commit

Permalink
fix api data passing
Browse files Browse the repository at this point in the history
  • Loading branch information
squi-ddy committed Oct 22, 2024
1 parent 4f1623b commit b414c0f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions frontend/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export async function getTransactionToken(amount: string): Promise<TransactionTo
export async function cancelTransationToken(transId: string): Promise<boolean> {
try {
await fetcher.post("/student/cancelTransaction", {
transId
transaction_id: transId
});
return true;
} catch (error) {
Expand All @@ -57,7 +57,7 @@ export async function getTransactionDetails(transId: string): Promise<Transactio
try {
const resp = await fetcher.get("/booth/getTransaction", {
params: {
transId,
transaction_id: transId,
},
})
return resp.data as TransactionDetails;
Expand All @@ -69,7 +69,7 @@ export async function getTransactionDetails(transId: string): Promise<Transactio
export async function collectTransaction(transId: string): Promise<boolean> {
try {
await fetcher.post("/booth/collectTransaction", {
transId,
transaction_id: transId,
});
return true;
} catch (error) {
Expand Down Expand Up @@ -102,7 +102,7 @@ export async function getTopup(tokenId: string): Promise<TopupDetails | null> {
try {
const resp = await fetcher.get("/admin/getTopup", {
params: {
tokenId,
token_id: tokenId,
},
});
return resp.data as TopupDetails;
Expand All @@ -114,7 +114,7 @@ export async function getTopup(tokenId: string): Promise<TopupDetails | null> {
export async function addMoney(tokenId: string, amount: string): Promise<boolean> {
try {
await fetcher.post("/admin/addMoney", {
tokenId,
token_id: tokenId,
amount,
});
return true;
Expand Down

0 comments on commit b414c0f

Please sign in to comment.