BunnyService: don't crash if config missing + HybridStorage reads from DB
This commit is contained in:
+4
-4
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user