From 707d725f4ae17342bd96fdf326d6f2506619dddf Mon Sep 17 00:00:00 2001 From: SysAdmin Date: Mon, 1 Dec 2025 23:38:06 +0000 Subject: [PATCH] fix: Add explicit route attributes to PublicBotsController MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add [Route] and [HttpGet] attributes to ensure proper route discovery and matching for anonymous ShareCard access. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- LittleShop/Areas/Admin/Controllers/PublicBotsController.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/LittleShop/Areas/Admin/Controllers/PublicBotsController.cs b/LittleShop/Areas/Admin/Controllers/PublicBotsController.cs index e774ae4..bbcd440 100644 --- a/LittleShop/Areas/Admin/Controllers/PublicBotsController.cs +++ b/LittleShop/Areas/Admin/Controllers/PublicBotsController.cs @@ -12,6 +12,7 @@ namespace LittleShop.Areas.Admin.Controllers; /// [Area("Admin")] [AllowAnonymous] +[Route("Admin/[controller]/[action]/{id?}")] public class PublicBotsController : Controller { private readonly IBotService _botService; @@ -21,7 +22,8 @@ public class PublicBotsController : Controller _botService = botService; } - // GET: Admin/PublicBots/ShareCard/5 + // GET: Admin/PublicBots/ShareCard/{id} + [HttpGet] public async Task ShareCard(Guid id) { var bot = await _botService.GetBotByIdAsync(id); @@ -43,7 +45,8 @@ public class PublicBotsController : Controller return View("~/Areas/Admin/Views/Bots/ShareCard.cshtml", bot); } - // GET: Admin/PublicBots/ShareCardEmbed/5 + // GET: Admin/PublicBots/ShareCardEmbed/{id} + [HttpGet] public async Task ShareCardEmbed(Guid id) { var bot = await _botService.GetBotByIdAsync(id);