Fix: TeleBot order deletion and bot activity tracking
**Fixes Applied:** 1. **Order Deletion Authorization (HTTP 401)** - Added [AllowAnonymous] to CancelOrder endpoint - Allows customers to cancel orders using IdentityReference - File: LittleShop/Controllers/OrdersController.cs:160 2. **Bot Activity Tracking Hostname** - Changed littleshop-admin:8080 → littleshop:5000 - Fixed DNS resolution errors in production - Files: TeleBot/appsettings.json, BotActivityTracker.cs, docker-compose.hostinger.yml 3. **Tor Proxy Investigation** - Analyzed SOCKS connection failures - Tor is working correctly, API blocks exit nodes (expected) - Fallback to default currencies working as designed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
217de2a5ab
commit
9206067e9c
@ -157,6 +157,7 @@ public class OrdersController : ControllerBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("{id}/cancel")]
|
[HttpPost("{id}/cancel")]
|
||||||
|
[AllowAnonymous]
|
||||||
public async Task<ActionResult> CancelOrder(Guid id, [FromBody] CancelOrderDto cancelOrderDto)
|
public async Task<ActionResult> CancelOrder(Guid id, [FromBody] CancelOrderDto cancelOrderDto)
|
||||||
{
|
{
|
||||||
var success = await _orderService.CancelOrderAsync(id, cancelOrderDto.IdentityReference);
|
var success = await _orderService.CancelOrderAsync(id, cancelOrderDto.IdentityReference);
|
||||||
|
|||||||
@ -6,7 +6,7 @@ TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
|
|||||||
TELEGRAM_ADMIN_CHAT_ID=your_admin_chat_id_here
|
TELEGRAM_ADMIN_CHAT_ID=your_admin_chat_id_here
|
||||||
|
|
||||||
# LittleShop API Configuration
|
# LittleShop API Configuration
|
||||||
LITTLESHOP_API_URL=http://littleshop-admin:8080
|
LITTLESHOP_API_URL=http://littleshop:5000
|
||||||
LITTLESHOP_USERNAME=admin
|
LITTLESHOP_USERNAME=admin
|
||||||
LITTLESHOP_PASSWORD=your_admin_password_here
|
LITTLESHOP_PASSWORD=your_admin_password_here
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ namespace TeleBot.Services
|
|||||||
_httpClient = httpClient;
|
_httpClient = httpClient;
|
||||||
_configuration = configuration;
|
_configuration = configuration;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_littleShopUrl = configuration["LittleShop:BaseUrl"] ?? "http://littleshop-admin:8080";
|
_littleShopUrl = configuration["LittleShop:BaseUrl"] ?? "http://littleshop:5000";
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task TrackActivityAsync(
|
public async Task TrackActivityAsync(
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
"Comment": "Optional secret key for webhook authentication"
|
"Comment": "Optional secret key for webhook authentication"
|
||||||
},
|
},
|
||||||
"LittleShop": {
|
"LittleShop": {
|
||||||
"ApiUrl": "http://littleshop-admin:8080",
|
"ApiUrl": "http://littleshop:5000",
|
||||||
"OnionUrl": "",
|
"OnionUrl": "",
|
||||||
"Username": "admin",
|
"Username": "admin",
|
||||||
"Password": "admin",
|
"Password": "admin",
|
||||||
|
|||||||
@ -13,7 +13,7 @@ services:
|
|||||||
- TelegramBot__BotToken=${BOT_TOKEN}
|
- TelegramBot__BotToken=${BOT_TOKEN}
|
||||||
- TelegramBot__WebhookUrl=${WEBHOOK_URL}
|
- TelegramBot__WebhookUrl=${WEBHOOK_URL}
|
||||||
- TelegramBot__UseWebhook=false
|
- TelegramBot__UseWebhook=false
|
||||||
- LittleShopApi__BaseUrl=http://littleshop-admin:8080
|
- LittleShopApi__BaseUrl=http://littleshop:5000
|
||||||
- LittleShopApi__ApiKey=${LITTLESHOP_API_KEY}
|
- LittleShopApi__ApiKey=${LITTLESHOP_API_KEY}
|
||||||
- Logging__LogLevel__Default=Information
|
- Logging__LogLevel__Default=Information
|
||||||
- Logging__LogLevel__Microsoft=Warning
|
- Logging__LogLevel__Microsoft=Warning
|
||||||
@ -25,7 +25,7 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- littleshop-network
|
- littleshop-network
|
||||||
depends_on:
|
depends_on:
|
||||||
- littleshop-admin
|
- littleshop
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "pgrep", "-f", "dotnet.*TeleBot"]
|
test: ["CMD", "pgrep", "-f", "dotnet.*TeleBot"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@ -33,9 +33,9 @@ services:
|
|||||||
retries: 3
|
retries: 3
|
||||||
start_period: 60s
|
start_period: 60s
|
||||||
|
|
||||||
littleshop-admin:
|
littleshop:
|
||||||
external: true
|
external: true
|
||||||
name: littleshop-admin
|
name: littleshop
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
littleshop-network:
|
littleshop-network:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user