fix: Add explicit route attributes to PublicBotsController
All checks were successful
Build and Deploy LittleShop / Deploy to Production VPS (Manual Only) (push) Has been skipped
Build and Deploy LittleShop / Deploy to Pre-Production (CT109) (push) Successful in 1m5s

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 <noreply@anthropic.com>
This commit is contained in:
SysAdmin 2025-12-01 23:38:06 +00:00
parent 996f207c48
commit 707d725f4a

View File

@ -12,6 +12,7 @@ namespace LittleShop.Areas.Admin.Controllers;
/// </summary>
[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<IActionResult> 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<IActionResult> ShareCardEmbed(Guid id)
{
var bot = await _botService.GetBotByIdAsync(id);