1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

rename some items

This commit is contained in:
Fedor Katurov 2023-11-17 23:24:33 +06:00
parent afc04abfd4
commit 865de09ad9
12 changed files with 119 additions and 89 deletions

View file

@ -5,12 +5,21 @@ import {
GetLabStatsResult,
GetLabUpdatesResult,
} from '~/types/lab';
import { api, cleanResult } from '~/utils/api';
import { api, unwrap } from '~/utils/api';
export const getLabNodes = ({ offset, limit, sort, search }: GetLabNodesRequest) =>
export const getLabNodes = ({
offset,
limit,
sort,
search,
}: GetLabNodesRequest) =>
api
.get<GetLabNodesResult>(API.LAB.NODES, { params: { offset, limit, sort, search } })
.then(cleanResult);
.get<GetLabNodesResult>(API.LAB.NODES, {
params: { offset, limit, sort, search },
})
.then(unwrap);
export const getLabStats = () => api.get<GetLabStatsResult>(API.LAB.STATS).then(cleanResult);
export const getLabUpdates = () => api.get<GetLabUpdatesResult>(API.LAB.UPDATES).then(cleanResult);
export const getLabStats = () =>
api.get<GetLabStatsResult>(API.LAB.STATS).then(unwrap);
export const getLabUpdates = () =>
api.get<GetLabUpdatesResult>(API.LAB.UPDATES).then(unwrap);