Improve AI description saving and logging in the admin interface
Add console logging for AI data processing and API responses in the admin video editing dialog. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1/n7jzC7R
This commit is contained in:
parent
c1fa3898f5
commit
fb4aea7b25
@ -337,10 +337,13 @@ function EditVideoDialog({
|
||||
|
||||
// Save without closing modal for AI generation
|
||||
try {
|
||||
await apiRequest("PATCH", `/api/admin/videos/${video.id}`, processedData);
|
||||
console.log("About to save AI data:", JSON.stringify(processedData, null, 2));
|
||||
const response = await apiRequest("PATCH", `/api/admin/videos/${video.id}`, processedData);
|
||||
console.log("AI save response:", response.status);
|
||||
// Refresh cache after save
|
||||
await queryClient.invalidateQueries({ queryKey: ["/api/admin/videos"] });
|
||||
await queryClient.refetchQueries({ queryKey: ["/api/admin/videos"] });
|
||||
console.log("Cache refreshed after AI save");
|
||||
} catch (error) {
|
||||
console.error("Failed to save AI description:", error);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user