1
This commit is contained in:
@@ -50,6 +50,19 @@ export async function getPuzzleGalleryDetail(profileId: string) {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 点赞公开拼图作品,后端按当前登录用户做幂等计数。
|
||||
*/
|
||||
export async function likePuzzleGalleryWork(profileId: string) {
|
||||
return requestJson<{ item: PuzzleWorkSummary }>(
|
||||
`${PUZZLE_GALLERY_API_BASE}/${encodeURIComponent(profileId)}/like`,
|
||||
{
|
||||
method: 'POST',
|
||||
},
|
||||
'点赞拼图作品失败',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将公开拼图作品复制为当前用户的草稿。
|
||||
*/
|
||||
@@ -65,6 +78,7 @@ export async function remixPuzzleGalleryWork(profileId: string) {
|
||||
|
||||
export const puzzleGalleryClient = {
|
||||
getDetail: getPuzzleGalleryDetail,
|
||||
like: likePuzzleGalleryWork,
|
||||
list: listPuzzleGallery,
|
||||
remix: remixPuzzleGalleryWork,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user