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:
parent
6836e00de1
commit
99426172b2
12 changed files with 79 additions and 22 deletions
src/redux/node
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue