Update video details in the administration panel
Add logging to the /api/admin/videos/:id PATCH endpoint and the BunnyStorage updateVideo method in server/storage.ts to capture video update requests and parsed data. 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:
@@ -852,6 +852,7 @@ class BunnyStorage implements IStorage {
|
||||
// Try to update in database first
|
||||
let dbUpdateSuccessful = false;
|
||||
try {
|
||||
console.log(`Updating video ${id} with data:`, JSON.stringify(updates, null, 2));
|
||||
await db.update(videos).set({...updates, updatedAt: new Date()}).where(eq(videos.id, id));
|
||||
console.log(`Successfully updated video ${id} in database`);
|
||||
dbUpdateSuccessful = true;
|
||||
|
||||
Reference in New Issue
Block a user