too many changes
This commit is contained in:
@@ -32,7 +32,7 @@ public sealed class SaveMediaCommandHandler : IRequestHandler<SaveMediaCommand,
|
||||
if (request.CollectionId.HasValue)
|
||||
{
|
||||
var col = await _collections.GetByIdAsync(request.CollectionId.Value, cancellationToken);
|
||||
if (col is null || col.OwnerTelegramId != request.OwnerTelegramId)
|
||||
if (col is null || !col.CanWrite(request.OwnerTelegramId))
|
||||
throw new DomainException("Target collection not found.");
|
||||
collectionId = col.Id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user