mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
fetching node liked
This commit is contained in:
parent
53abb3853e
commit
16af90fd50
3 changed files with 5 additions and 2 deletions
|
@ -28,11 +28,13 @@ export const getNodes = ({
|
||||||
|
|
||||||
export const getNode = ({
|
export const getNode = ({
|
||||||
id,
|
id,
|
||||||
|
access,
|
||||||
}: {
|
}: {
|
||||||
id: string | number;
|
id: string | number;
|
||||||
|
access: string;
|
||||||
}): Promise<IResultWithStatus<{ nodes: INode[] }>> =>
|
}): Promise<IResultWithStatus<{ nodes: INode[] }>> =>
|
||||||
api
|
api
|
||||||
.get(API.NODE.GET_NODE(id))
|
.get(API.NODE.GET_NODE(id), configWithToken(access))
|
||||||
.then(resultMiddleware)
|
.then(resultMiddleware)
|
||||||
.catch(errorMiddleware);
|
.catch(errorMiddleware);
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ function* onNodeLoad({ id, node_type }: ReturnType<typeof nodeLoadNode>) {
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: { node, error },
|
data: { node, error },
|
||||||
} = yield call(getNode, { id });
|
} = yield call(reqWrapper, getNode, { id });
|
||||||
|
|
||||||
yield put(nodeSetLoading(false));
|
yield put(nodeSetLoading(false));
|
||||||
|
|
||||||
|
|
|
@ -119,6 +119,7 @@ export interface INode {
|
||||||
blocks: IBlock[];
|
blocks: IBlock[];
|
||||||
thumbnail?: string;
|
thumbnail?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
|
is_liked?: boolean;
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
flow: {
|
flow: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue