18 lines
522 B
TypeScript
18 lines
522 B
TypeScript
import api from "../axios";
|
|
import { API_ENDPOINTS } from "../endpoints";
|
|
import { ApiResponse } from "../types";
|
|
import { TTenderResponse } from "../types/Tenders";
|
|
|
|
export const tendersService = {
|
|
tendersList: async (
|
|
params?: Record<string, any>,
|
|
): Promise<ApiResponse<TTenderResponse>> => {
|
|
try {
|
|
return (await api.get(API_ENDPOINTS.TENDERS.READ_ALL, { params })).data;
|
|
} catch (error) {
|
|
console.error("ERROR caught in Tenders Services Read all:", error);
|
|
throw error;
|
|
}
|
|
},
|
|
};
|