feat: add content review flow
This commit is contained in:
@@ -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
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user