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:
parent
afc04abfd4
commit
865de09ad9
12 changed files with 119 additions and 89 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue