tariff getList
This commit is contained in:
parent
3a84c260d0
commit
b6646ed54f
@ -26,7 +26,7 @@ export const getTariffs = async (
|
|||||||
try {
|
try {
|
||||||
const tariffsResponse = await makeRequest<never, GetTariffsResponse>({
|
const tariffsResponse = await makeRequest<never, GetTariffsResponse>({
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url: `${API_URL}/tariff?page=${apiPage}&limit=${tariffsPerPage}`,
|
url: `${API_URL}/tariff/getList?page=${apiPage}&limit=${tariffsPerPage}`,
|
||||||
useToken: true,
|
useToken: true,
|
||||||
signal,
|
signal,
|
||||||
});
|
});
|
||||||
|
@ -63,6 +63,7 @@ export default function ProtectedLayout() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
useAllTariffsFetcher({
|
useAllTariffsFetcher({
|
||||||
|
baseUrl: process.env.REACT_APP_DOMAIN + "/strator/tariff/getList",
|
||||||
onSuccess: updateTariffs,
|
onSuccess: updateTariffs,
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
const errorMessage = getMessageFromFetchError(error);
|
const errorMessage = getMessageFromFetchError(error);
|
||||||
|
Loading…
Reference in New Issue
Block a user