Initial commit of LittleShop project (excluding large archives)

- BTCPay Server integration
- TeleBot Telegram bot
- Review system
- Admin area
- Docker deployment configuration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-17 15:07:38 +01:00
parent bcca00ab39
commit e1b377a042
140 changed files with 32166 additions and 21089 deletions

View File

@@ -258,11 +258,11 @@ public class ProductService : IProductService
var product = await _context.Products.FindAsync(photoDto.ProductId);
if (product == null) return null;
var maxSortOrder = await _context.ProductPhotos
var existingPhotos = await _context.ProductPhotos
.Where(pp => pp.ProductId == photoDto.ProductId)
.Select(pp => pp.SortOrder)
.DefaultIfEmpty(0)
.MaxAsync();
.ToListAsync();
var maxSortOrder = existingPhotos.Any() ? existingPhotos.Max(pp => pp.SortOrder) : 0;
var productPhoto = new ProductPhoto
{