diff --git a/Src/VideoGameQuotes.Web/Controllers/QuoteController.cs b/Src/VideoGameQuotes.Web/Controllers/QuoteController.cs index 5d7de55..d623c59 100644 --- a/Src/VideoGameQuotes.Web/Controllers/QuoteController.cs +++ b/Src/VideoGameQuotes.Web/Controllers/QuoteController.cs @@ -192,7 +192,7 @@ namespace VideoGameQuotes.Web.Controllers { } [HttpPost, VerifyUser(Group = UserGroup.Admin)] - public ActionResult Edit(EditQuoteModelBase model) { + public ActionResult Edit(EditQuoteModel model) { return CreateOrEditQuote(model, "Edit"); } diff --git a/Src/VideoGameQuotes.Web/Global.asax.cs b/Src/VideoGameQuotes.Web/Global.asax.cs index 27ef70f..1c97171 100644 --- a/Src/VideoGameQuotes.Web/Global.asax.cs +++ b/Src/VideoGameQuotes.Web/Global.asax.cs @@ -76,11 +76,11 @@ namespace VideoGameQuotes.Web { //these routes don't work with constraints in mono...? routes.MapSmartRoute("quote-edit", "quote/edit/{id}", new { controller = "Quote", action = "Edit" }); - routes.MapSmartRoute("quote-delete", "quote/delete", new { controller = "Quote", action = "Delete" }); - routes.MapSmartRoute("quote-dismiss-flag", "quote/dismiss-flag", new { controller = "Quote", action = "DismissFlag" }); routes.MapSmartRoute("single-quote", "quote/{id}/{*text}", new { controller = "Quote", action = "Quote" }); - //routes.MapSmartRoute("dismiss-flag", "dismiss-flag", new { controller = "Quote", action = "FooBar" }); + routes.MapSmartRoute("quote-delete", "quote/delete", new { controller = "Quote", action = "Delete" }); + routes.MapSmartRoute("quote-dismiss-flag", "quote/dismiss-flag", new { controller = "Quote", action = "DismissFlag" }); + routes.MapSmartRoute("default", "", new { controller = "Home", action = "Index" }); } } diff --git a/Src/VideoGameQuotes.Web/Models/EditQuoteModel.cs b/Src/VideoGameQuotes.Web/Models/EditQuoteModel.cs index f87cac6..f6ea3fa 100644 --- a/Src/VideoGameQuotes.Web/Models/EditQuoteModel.cs +++ b/Src/VideoGameQuotes.Web/Models/EditQuoteModel.cs @@ -4,6 +4,8 @@ using VideoGameQuotes.Api; namespace VideoGameQuotes.Web.Models { public class EditQuoteModel : EditQuoteModelBase { + public EditQuoteModel() { } + public EditQuoteModel(Quote quote) { QuoteId = quote.Id; Flags = quote.Flags.ToList();