Add bulk update functionality for image status

- Introduced a new endpoint in the backend to handle bulk updates of image statuses by content ID or image IDs.
- Updated the frontend to include a new row action for updating image status and integrated a modal for status confirmation.
- Enhanced the API service to support bulk status updates and updated the images page to manage status updates effectively.
This commit is contained in:
IGNY8 VPS (Salman)
2025-11-12 01:37:41 +00:00
parent 645c6f3f9e
commit 9f20b8e065
6 changed files with 212 additions and 0 deletions

View File

@@ -1032,6 +1032,13 @@ export async function fetchContentImages(): Promise<ContentImagesResponse> {
return fetchAPI('/v1/writer/images/content_images/');
}
export async function bulkUpdateImagesStatus(contentId: number, status: string): Promise<{ updated_count: number }> {
return fetchAPI(`/v1/writer/images/bulk_update/`, {
method: 'POST',
body: JSON.stringify({ content_id: contentId, status }),
});
}
export async function generateImages(imageIds: number[], contentId?: number): Promise<any> {
return fetchAPI('/v1/writer/images/generate_images/', {
method: 'POST',