This repository has been archived by the owner on Nov 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
53 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,6 +122,30 @@ export function collectGroupPost(postId, status) { | |
return api({ method, url, validateStatus: s => s === 201 || s === 204 }); | ||
} | ||
|
||
/** | ||
* 收藏帖子 | ||
* @author mutoe <[email protected]> | ||
* @export | ||
* @param {number} postId | ||
* @returns | ||
*/ | ||
export function collectionPost(postId) { | ||
const url = `/plus-group/group-posts/${postId}/collections`; | ||
return api.post(url, { validataStatus: s => s === 204 }); | ||
} | ||
|
||
/** | ||
* 取消收藏帖子 | ||
* @author mutoe <[email protected]> | ||
* @export | ||
* @param {number} postId | ||
* @returns | ||
*/ | ||
export function uncollectPost(postId) { | ||
const url = `/plus-group/group-posts/${postId}/uncollect`; | ||
return api.delete(url, { validateStatus: s => s === 204 }); | ||
} | ||
|
||
/** | ||
* 获取指定圈子的圈子详情 | ||
* @author jsonleex <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters