fix: refine jump hop draft detail flow
This commit is contained in:
@@ -185,9 +185,16 @@ export function executeJumpHopCreationAction(
|
||||
.then(normalizeJumpHopActionResponse);
|
||||
}
|
||||
|
||||
export async function getJumpHopWorkDetail(profileId: string) {
|
||||
export async function getJumpHopWorkDetail(
|
||||
profileId: string,
|
||||
options: { audience?: 'creation' | 'runtime' } = {},
|
||||
) {
|
||||
const base =
|
||||
options.audience === 'creation'
|
||||
? JUMP_HOP_WORKS_API_BASE
|
||||
: `${JUMP_HOP_RUNTIME_API_BASE}/works`;
|
||||
const response = await requestJson<JumpHopWorkDetailResponse>(
|
||||
`${JUMP_HOP_RUNTIME_API_BASE}/works/${encodeURIComponent(profileId)}`,
|
||||
`${base}/${encodeURIComponent(profileId)}`,
|
||||
{ method: 'GET' },
|
||||
'读取跳一跳作品详情失败',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user