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

loading node with hook

This commit is contained in:
Fedor Katurov 2021-09-20 11:26:20 +07:00
parent 35ce593ed8
commit 5e1e575ee3
19 changed files with 117 additions and 66 deletions

View file

@ -66,8 +66,8 @@ export const getNodeDiff = ({
})
.then(cleanResult);
export const apiGetNode = ({ id }: ApiGetNodeRequest, config?: AxiosRequestConfig) =>
api.get<ApiGetNodeResult>(API.NODE.GET_NODE(id), config).then(cleanResult);
export const apiGetNode = (id: INode['id']) =>
api.get<ApiGetNodeResult>(API.NODE.GET_NODE(id!)).then(cleanResult);
export const apiGetNodeWithCancel = ({ id }: ApiGetNodeRequest) => {
const cancelToken = axios.CancelToken.source();