Update video information only in the database
Modify the `updateVideo` method in `HybridStorage` to exclusively update video details in the PostgreSQL database, removing the previous logic that also updated the Bunny cache. 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/d05DGZF
This commit is contained in:
parent
af87e190e0
commit
aef9d6e04a
@ -1046,15 +1046,12 @@ export class HybridStorage implements IStorage {
|
||||
}
|
||||
|
||||
async updateVideo(id: string, video: UpdateVideo): Promise<Video | undefined> {
|
||||
// Save changes to PostgreSQL database instead of Bunny cache
|
||||
console.log(`🔥 HybridStorage.updateVideo called for video ${id}`);
|
||||
|
||||
// Save changes ONLY to PostgreSQL database - do not update Bunny cache
|
||||
const result = await this.databaseStorage.updateVideo(id, video);
|
||||
|
||||
// Also invalidate Bunny cache so changes are reflected immediately
|
||||
const bunnyVideo = await this.bunnyStorage.getVideo(id);
|
||||
if (bunnyVideo) {
|
||||
await this.bunnyStorage.updateVideo(id, video);
|
||||
}
|
||||
|
||||
console.log(`✅ HybridStorage: Video ${id} updated in PostgreSQL database only`);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user