too many changes

This commit is contained in:
2026-10-07 02:17:30 +04:00
parent 0c7f3bce90
commit bcf985c17d
74 changed files with 4048 additions and 78 deletions
@@ -12,7 +12,9 @@ public sealed class UpdateCollectionCommandHandler(
public async Task<bool> Handle(UpdateCollectionCommand request, CancellationToken ct)
{
var collection = await collections.GetByIdAsync(request.CollectionId, ct);
if (collection is null || collection.OwnerTelegramId != request.RequestingTelegramId)
// Если коллекции нет или пользователь — не участник, возвращаем 404.
// Если роль ниже Manager — domain.Rename() бросит DomainException.
if (collection is null || collection.GetRole(request.RequestingTelegramId) is null)
return false;
collection.Rename(request.Name, request.RequestingTelegramId);