Remove BTCPay completely, integrate SilverPAY only, configure TeleBot with real token
- Removed all BTCPay references from services and configuration - Implemented SilverPAY as sole payment provider (no fallback) - Fixed JWT authentication with proper key length (256+ bits) - Added UsersController with full CRUD operations - Updated User model with Email and Role properties - Configured TeleBot with real Telegram bot token - Fixed launchSettings.json with JWT environment variable - E2E tests passing for authentication, catalog, orders - Payment creation pending SilverPAY server fix 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -39,28 +39,36 @@ public class CatalogController : ControllerBase
|
||||
|
||||
[HttpGet("products")]
|
||||
public async Task<ActionResult<PagedResult<ProductDto>>> GetProducts(
|
||||
[FromQuery] int pageNumber = 1,
|
||||
[FromQuery] int pageSize = 20,
|
||||
[FromQuery] int pageNumber = 1,
|
||||
[FromQuery] int pageSize = 20,
|
||||
[FromQuery] Guid? categoryId = null)
|
||||
{
|
||||
var allProducts = categoryId.HasValue
|
||||
? await _productService.GetProductsByCategoryAsync(categoryId.Value)
|
||||
: await _productService.GetAllProductsAsync();
|
||||
|
||||
var productList = allProducts.ToList();
|
||||
var totalCount = productList.Count;
|
||||
var skip = (pageNumber - 1) * pageSize;
|
||||
var pagedProducts = productList.Skip(skip).Take(pageSize).ToList();
|
||||
|
||||
var result = new PagedResult<ProductDto>
|
||||
try
|
||||
{
|
||||
Items = pagedProducts,
|
||||
TotalCount = totalCount,
|
||||
PageNumber = pageNumber,
|
||||
PageSize = pageSize
|
||||
};
|
||||
|
||||
return Ok(result);
|
||||
var allProducts = categoryId.HasValue
|
||||
? await _productService.GetProductsByCategoryAsync(categoryId.Value)
|
||||
: await _productService.GetAllProductsAsync();
|
||||
|
||||
var productList = allProducts.ToList();
|
||||
var totalCount = productList.Count;
|
||||
var skip = (pageNumber - 1) * pageSize;
|
||||
var pagedProducts = productList.Skip(skip).Take(pageSize).ToList();
|
||||
|
||||
var result = new PagedResult<ProductDto>
|
||||
{
|
||||
Items = pagedProducts,
|
||||
TotalCount = totalCount,
|
||||
PageNumber = pageNumber,
|
||||
PageSize = pageSize
|
||||
};
|
||||
|
||||
return Ok(result);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Log the error and return a proper error response
|
||||
return StatusCode(500, new { message = "An error occurred while fetching products", error = ex.Message });
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet("products/{id}")]
|
||||
|
||||
Reference in New Issue
Block a user