wag-frontend-version-3/apicalls/accounts/account.tsx

19 lines
521 B
TypeScript

"use server";
import { fetchData, fetchDataWithToken } from "../api-fetcher";
import { baseUrl, FilterList, FilterListInterface } from "../basics";
const accountsListEndpoint = `${baseUrl}/account/records/list`;
async function retrieveaccountsList(payload: FilterListInterface) {
const feedObject = new FilterList(payload).filter();
const tokenResponse: any = await fetchDataWithToken(
accountsListEndpoint,
feedObject,
"POST",
false
);
return tokenResponse;
}
export { retrieveaccountsList };