feat: add content review flow

This commit is contained in:
2026-01-15 11:10:43 +08:00
parent 37da8256fa
commit 37325ab1b4
10 changed files with 422 additions and 4 deletions

View File

@@ -109,5 +109,26 @@ export const ContentService = {
method: 'PATCH',
body: { status }
});
},
async reviewContent(contentID, { action, reason } = {}) {
if (!contentID) throw new Error('contentID is required');
return requestJson(`/super/v1/contents/${contentID}/review`, {
method: 'POST',
body: {
action,
reason
}
});
},
async batchReviewContents({ content_ids, action, reason } = {}) {
if (!Array.isArray(content_ids) || content_ids.length === 0) throw new Error('content_ids is required');
return requestJson('/super/v1/contents/review/batch', {
method: 'POST',
body: {
content_ids,
action,
reason
}
});
}
};