Files
Swarm/DysonNetwork.Pass/Features/Account/Controllers/MagicSpellController.cs

21 lines
563 B
C#

using Microsoft.AspNetCore.Mvc;
using DysonNetwork.Pass.Data;
namespace DysonNetwork.Pass.Features.Account;
[ApiController]
[Route("/spells")]
public class MagicSpellController(PassDatabase db, MagicSpellService sp) : ControllerBase
{
[HttpPost("{spellId:guid}/resend")]
public async Task<ActionResult> ResendMagicSpell(Guid spellId)
{
var spell = db.MagicSpells.FirstOrDefault(x => x.Id == spellId);
if (spell == null)
return NotFound();
await sp.NotifyMagicSpell(spell, true);
return Ok();
}
}