26 lines
880 B
C#
26 lines
880 B
C#
using Modules.Library.Application.Interfaces;
|
|
using Modules.Library.Domain.Entities;
|
|
using Modules.Library.Application.Gateways;
|
|
|
|
namespace Modules.Library.Application.Services;
|
|
|
|
public class MediaInfoService(IMediaInfoGateway mediaInfoGateway)
|
|
{
|
|
public async Task Add(IUser user, string url, MediaInfoType type)
|
|
{
|
|
if (!user.CanAddMediaInfo()) throw new Exception("AccessDenied");
|
|
//await mediaInfoGateway.AddAsync(url, type);
|
|
}
|
|
|
|
public async Task Edit(IUser user, Guid id, string url, MediaInfoType type)
|
|
{
|
|
if (!user.CanEditMediaInfo()) throw new Exception("AccessDenied");
|
|
//await domainMediaInfoService.Edit(id, url, type);
|
|
}
|
|
|
|
public async Task Remove(IUser user, Guid id)
|
|
{
|
|
if (!user.CanRemoveMediaInfo()) throw new Exception("AccessDenied");
|
|
//await domainMediaInfoService.Remove(id);
|
|
}
|
|
} |