This commit is contained in:
2026-04-30 17:49:07 +08:00
parent 805d6f8cae
commit 9d684cb7b3
615 changed files with 15368 additions and 6172 deletions

View File

@@ -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,
};