Add success alert when script saved

This commit is contained in:
Pat Hartl 2023-01-16 02:38:30 -06:00
parent f2dfc90de8
commit 9d23901be8

View file

@ -14,7 +14,7 @@ using LANCommander.Services;
namespace LANCommander.Controllers namespace LANCommander.Controllers
{ {
[Authorize(Roles = "Administrator")] [Authorize(Roles = "Administrator")]
public class ScriptsController : Controller public class ScriptsController : BaseController
{ {
private readonly GameService GameService; private readonly GameService GameService;
private readonly ScriptService ScriptService; private readonly ScriptService ScriptService;
@ -75,6 +75,8 @@ namespace LANCommander.Controllers
{ {
await ScriptService.Update(script); await ScriptService.Update(script);
Alert("The script has been saved!", "success");
return RedirectToAction("Edit", "Games", new { id = script.GameId }); return RedirectToAction("Edit", "Games", new { id = script.GameId });
} }