1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-05-03 16:46:41 +07:00

fixed pushing tags

This commit is contained in:
Fedor Katurov 2019-10-24 12:43:54 +07:00
parent 6836e00de1
commit 99426172b2
12 changed files with 79 additions and 22 deletions
src/redux/node

View file

@ -2,6 +2,7 @@ import { api, configWithToken, resultMiddleware, errorMiddleware } from '~/utils
import { INode, IResultWithStatus, IComment } from '../types';
import { API } from '~/constants/api';
import { nodeUpdateTags, nodeLike, nodeStar } from './actions';
import { INodeState } from './reducer';
export const postNode = ({
access,
@ -58,12 +59,24 @@ export const getNodeComments = ({
}: {
id: number;
access: string;
}): Promise<IResultWithStatus<{ comment: Comment }>> =>
}): Promise<IResultWithStatus<{ comments: Comment[] }>> =>
api
.get(API.NODE.COMMENT(id), configWithToken(access))
.then(resultMiddleware)
.catch(errorMiddleware);
export const getNodeRelated = ({
id,
access,
}: {
id: number;
access: string;
}): Promise<IResultWithStatus<{ related: INodeState['related'] }>> =>
api
.get(API.NODE.RELATED(id), configWithToken(access))
.then(resultMiddleware)
.catch(errorMiddleware);
export const updateNodeTags = ({
id,
tags,