diff --git a/src/redux/node/api.ts b/src/redux/node/api.ts index b7c2e7cd..e8f6da65 100644 --- a/src/redux/node/api.ts +++ b/src/redux/node/api.ts @@ -28,11 +28,13 @@ export const getNodes = ({ export const getNode = ({ id, + access, }: { id: string | number; + access: string; }): Promise> => api - .get(API.NODE.GET_NODE(id)) + .get(API.NODE.GET_NODE(id), configWithToken(access)) .then(resultMiddleware) .catch(errorMiddleware); diff --git a/src/redux/node/sagas.ts b/src/redux/node/sagas.ts index 7200a9d8..2749d7fc 100644 --- a/src/redux/node/sagas.ts +++ b/src/redux/node/sagas.ts @@ -73,7 +73,7 @@ function* onNodeLoad({ id, node_type }: ReturnType) { const { data: { node, error }, - } = yield call(getNode, { id }); + } = yield call(reqWrapper, getNode, { id }); yield put(nodeSetLoading(false)); diff --git a/src/redux/types.ts b/src/redux/types.ts index a849deab..cd9e592a 100644 --- a/src/redux/types.ts +++ b/src/redux/types.ts @@ -119,6 +119,7 @@ export interface INode { blocks: IBlock[]; thumbnail?: string; description?: string; + is_liked?: boolean; options: { flow: {