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

fetching node liked

This commit is contained in:
Fedor Katurov 2019-10-22 17:58:37 +07:00
parent 53abb3853e
commit 16af90fd50
3 changed files with 5 additions and 2 deletions

View file

@ -28,11 +28,13 @@ export const getNodes = ({
export const getNode = ({
id,
access,
}: {
id: string | number;
access: string;
}): Promise<IResultWithStatus<{ nodes: INode[] }>> =>
api
.get(API.NODE.GET_NODE(id))
.get(API.NODE.GET_NODE(id), configWithToken(access))
.then(resultMiddleware)
.catch(errorMiddleware);

View file

@ -73,7 +73,7 @@ function* onNodeLoad({ id, node_type }: ReturnType<typeof nodeLoadNode>) {
const {
data: { node, error },
} = yield call(getNode, { id });
} = yield call(reqWrapper, getNode, { id });
yield put(nodeSetLoading(false));

View file

@ -119,6 +119,7 @@ export interface INode {
blocks: IBlock[];
thumbnail?: string;
description?: string;
is_liked?: boolean;
options: {
flow: {