diff --git a/LittleShop/Controllers/OrdersController.cs b/LittleShop/Controllers/OrdersController.cs index 8c0462b..cf0c440 100644 --- a/LittleShop/Controllers/OrdersController.cs +++ b/LittleShop/Controllers/OrdersController.cs @@ -157,6 +157,7 @@ public class OrdersController : ControllerBase } [HttpPost("{id}/cancel")] + [AllowAnonymous] public async Task CancelOrder(Guid id, [FromBody] CancelOrderDto cancelOrderDto) { var success = await _orderService.CancelOrderAsync(id, cancelOrderDto.IdentityReference); diff --git a/TeleBot/.env.production.example b/TeleBot/.env.production.example index ef33da0..e7df67b 100644 --- a/TeleBot/.env.production.example +++ b/TeleBot/.env.production.example @@ -6,7 +6,7 @@ TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here TELEGRAM_ADMIN_CHAT_ID=your_admin_chat_id_here # LittleShop API Configuration -LITTLESHOP_API_URL=http://littleshop-admin:8080 +LITTLESHOP_API_URL=http://littleshop:5000 LITTLESHOP_USERNAME=admin LITTLESHOP_PASSWORD=your_admin_password_here diff --git a/TeleBot/TeleBot/Services/BotActivityTracker.cs b/TeleBot/TeleBot/Services/BotActivityTracker.cs index 2dd76c3..2e22035 100644 --- a/TeleBot/TeleBot/Services/BotActivityTracker.cs +++ b/TeleBot/TeleBot/Services/BotActivityTracker.cs @@ -36,7 +36,7 @@ namespace TeleBot.Services _httpClient = httpClient; _configuration = configuration; _logger = logger; - _littleShopUrl = configuration["LittleShop:BaseUrl"] ?? "http://littleshop-admin:8080"; + _littleShopUrl = configuration["LittleShop:BaseUrl"] ?? "http://littleshop:5000"; } public async Task TrackActivityAsync( diff --git a/TeleBot/TeleBot/appsettings.json b/TeleBot/TeleBot/appsettings.json index 6504299..b7a4ef2 100644 --- a/TeleBot/TeleBot/appsettings.json +++ b/TeleBot/TeleBot/appsettings.json @@ -20,7 +20,7 @@ "Comment": "Optional secret key for webhook authentication" }, "LittleShop": { - "ApiUrl": "http://littleshop-admin:8080", + "ApiUrl": "http://littleshop:5000", "OnionUrl": "", "Username": "admin", "Password": "admin", diff --git a/TeleBot/docker-compose.hostinger.yml b/TeleBot/docker-compose.hostinger.yml index b86df25..258afa9 100644 --- a/TeleBot/docker-compose.hostinger.yml +++ b/TeleBot/docker-compose.hostinger.yml @@ -13,7 +13,7 @@ services: - TelegramBot__BotToken=${BOT_TOKEN} - TelegramBot__WebhookUrl=${WEBHOOK_URL} - TelegramBot__UseWebhook=false - - LittleShopApi__BaseUrl=http://littleshop-admin:8080 + - LittleShopApi__BaseUrl=http://littleshop:5000 - LittleShopApi__ApiKey=${LITTLESHOP_API_KEY} - Logging__LogLevel__Default=Information - Logging__LogLevel__Microsoft=Warning @@ -25,7 +25,7 @@ services: networks: - littleshop-network depends_on: - - littleshop-admin + - littleshop healthcheck: test: ["CMD", "pgrep", "-f", "dotnet.*TeleBot"] interval: 30s @@ -33,9 +33,9 @@ services: retries: 3 start_period: 60s - littleshop-admin: + littleshop: external: true - name: littleshop-admin + name: littleshop networks: littleshop-network: