Skip to content

Commit

Permalink
media type implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-zhur committed Sep 28, 2024
1 parent 430385f commit f01fdd8
Show file tree
Hide file tree
Showing 15 changed files with 2,675 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using OneShelf.Common;
using OneShelf.Videos.BusinessLogic.Models;
using OneShelf.Videos.Database;
using OneShelf.Videos.Database.Models;
using OneShelf.Videos.Database.Models.Static;

namespace OneShelf.Videos.BusinessLogic.Services;
Expand All @@ -27,7 +28,7 @@ public Service1(IOptions<VideosOptions> options, VideosDatabase videosDatabase,
{
var messages = await _videosDatabase.Mediae
.Where(x => x.StaticMessage != null)
.Where(x => x.StaticMessage!.SelectedType == StaticMessageSelectedType.Photo)
.Where(x => x.StaticMessage!.SelectedType == MediaType.Photo)
.Where(x => x.StaticMessage!.Media != null)
.Where(x => x.UploadedItem == null)
.Include(x => x.StaticMessage)
Expand All @@ -44,7 +45,7 @@ public Service1(IOptions<VideosOptions> options, VideosDatabase videosDatabase,
{
var messages = await _videosDatabase.Mediae
.Where(x => x.StaticMessage != null)
.Where(x => x.StaticMessage!.SelectedType == StaticMessageSelectedType.Video)
.Where(x => x.StaticMessage!.SelectedType == MediaType.Video)
.Where(x => x.StaticMessage!.Media != null)
.Where(x => x.UploadedItem == null)
.Include(x => x.StaticMessage)
Expand Down
Loading

0 comments on commit f01fdd8

Please sign in to comment.