second commit

This commit is contained in:
rohit-kumar-fullstack
2026-01-07 10:19:34 +05:30
parent 59fb7e0df4
commit 743d571519
29 changed files with 16782 additions and 619 deletions
+30 -3
View File
@@ -1,5 +1,5 @@
import axios from "axios";
import { DASHBOARD_COUNT, GET_MY_AUCTION, GET_MY_TENDER, LIVE_AUCTION, LIVE_TENDER, LOG_IN_URL, PROCEED_PURCHASE_AUCTION } from "./ApiUrls";
import { DASHBOARD_COUNT, EMD_CHECK, FORARD_AUCTION_ITEM, GET_MY_AUCTION, GET_MY_TENDER, LIVE_AUCTION, LIVE_TENDER, LOG_IN_URL, PROCEED_PURCHASE_AUCTION, PURCHASE_OFFLINE_AUCTION, REVERSE_AUCTION_ITEM } from "./ApiUrls";
import { apiCall } from "../../Axios/Axios";
// User
@@ -39,8 +39,35 @@ export const fetchLiveAuction = async (payload: any): Promise<any> => {
// Auction Purchase offline
export const offlineAuctionPurchase = async (payload: any): Promise<any> => {
try {
const response = await axios.post(PROCEED_PURCHASE_AUCTION, payload);
return response.data;
const response = await apiCall<any>('post', `${PURCHASE_OFFLINE_AUCTION}`, payload);
return response;
} catch (error: any) {
throw error.response?.data || error.message;
}
};
// EMD
export const fetchEmdCheck = async (payload: any): Promise<any> => {
try {
const response = await apiCall<any>('get', `${EMD_CHECK}`, {}, payload);
return response;
} catch (error: any) {
throw error.response?.data || error.message;
}
};
export const fetchAuctionItem = async (payload: any): Promise<any> => {
try {
if (payload.status == 'Reverse') {
const response = await apiCall<any>('get', `${REVERSE_AUCTION_ITEM}`, {}, payload);
return response;
} else {
const response = await apiCall<any>('get', `${FORARD_AUCTION_ITEM}`, {}, payload);
return response;
}
} catch (error: any) {
throw error.response?.data || error.message;
}