BunnyService: don't crash if config missing + HybridStorage reads from DB

This commit is contained in:
2026-06-09 00:09:06 +02:00
parent 55df1e27f0
commit b1d3b77edb
2 changed files with 11 additions and 5 deletions
+4 -4
View File
@@ -1016,11 +1016,11 @@ export class HybridStorage implements IStorage {
// Video operations - use Bunny.net
async getVideos(limit?: number, offset?: number, search?: string): Promise<Video[]> {
return this.bunnyStorage.getVideos(limit, offset, search);
return this.databaseStorage.getVideos(limit, offset, search);
}
async getVideo(id: string): Promise<Video | undefined> {
return this.bunnyStorage.getVideo(id);
return this.databaseStorage.getVideo(id);
}
async createVideo(video: InsertVideo): Promise<Video> {
@@ -1033,11 +1033,11 @@ export class HybridStorage implements IStorage {
}
async updateVideoViews(id: string): Promise<void> {
return this.bunnyStorage.updateVideoViews(id);
return this.databaseStorage.updateVideoViews(id);
}
async getVideoCount(search?: string): Promise<number> {
return this.bunnyStorage.getVideoCount(search);
return this.databaseStorage.getVideoCount(search);
}
async deleteVideo(id: string): Promise<boolean> {