mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
test to make server
This commit is contained in:
@@ -100,6 +100,19 @@ public class MediaService : IMediaService
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> HasMediaAsync(Guid mediaId)
|
||||
{
|
||||
return await _dbContext.MediaFiles.AsNoTracking()
|
||||
.FirstOrDefaultAsync(x => x.Id == mediaId) is not null;
|
||||
}
|
||||
|
||||
public async Task<bool> HasMediaByUrlAsync(string url)
|
||||
{
|
||||
return await _dbContext.MediaFiles.AsNoTracking()
|
||||
.FirstOrDefaultAsync(x => x.Url == url) is not null;
|
||||
}
|
||||
|
||||
public async Task AttachToMessageAsync(Guid mediaId, Guid messageId)
|
||||
{
|
||||
var mediaFile = await _dbContext.MediaFiles
|
||||
|
||||
Reference in New Issue
Block a user