mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-05-01 23:56:41 +07:00
added tag deletion interface
This commit is contained in:
parent
0a75feef8d
commit
04a7b28a53
16 changed files with 195 additions and 39 deletions
|
@ -3,6 +3,8 @@ import { IComment, INode } from '../types';
|
|||
import { API } from '~/constants/api';
|
||||
import { COMMENTS_DISPLAY } from './constants';
|
||||
import {
|
||||
ApiDeleteNodeTagsRequest,
|
||||
ApiDeleteNodeTagsResult,
|
||||
ApiGetNodeRelatedRequest,
|
||||
ApiGetNodeRelatedResult,
|
||||
ApiGetNodeRequest,
|
||||
|
@ -101,6 +103,9 @@ export const apiPostNodeTags = ({ id, tags }: ApiPostNodeTagsRequest) =>
|
|||
.post<ApiPostNodeTagsResult>(API.NODE.UPDATE_TAGS(id), { tags })
|
||||
.then(cleanResult);
|
||||
|
||||
export const apiDeleteNodeTag = ({ id, tagId }: ApiDeleteNodeTagsRequest) =>
|
||||
api.delete<ApiDeleteNodeTagsResult>(API.NODE.DELETE_TAG(id, tagId)).then(cleanResult);
|
||||
|
||||
export const apiPostNodeLike = ({ id }: ApiPostNodeLikeRequest) =>
|
||||
api.post<ApiPostNodeLikeResult>(API.NODE.POST_LIKE(id)).then(cleanResult);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue