fix: Add explicit route attributes to PublicBotsController
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:
parent
996f207c48
commit
707d725f4a
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user