diff --git a/Src/VideoGameQuotes.Web/Controllers/AdminController.cs b/Src/VideoGameQuotes.Web/Controllers/AdminController.cs index b4e35e3..fda544c 100644 --- a/Src/VideoGameQuotes.Web/Controllers/AdminController.cs +++ b/Src/VideoGameQuotes.Web/Controllers/AdminController.cs @@ -132,5 +132,7 @@ namespace VideoGameQuotes.Web.Controllers { var flaggedQuotes = adminService.GetFlaggedQuotes(); return View(flaggedQuotes); } + + } } \ No newline at end of file diff --git a/Src/VideoGameQuotes.Web/Controllers/UserController.cs b/Src/VideoGameQuotes.Web/Controllers/UserController.cs index 25b3fca..fa3f874 100644 --- a/Src/VideoGameQuotes.Web/Controllers/UserController.cs +++ b/Src/VideoGameQuotes.Web/Controllers/UserController.cs @@ -34,18 +34,19 @@ namespace VideoGameQuotes.Web.Controllers { } } - [HttpPost, VerifyUser(Group = UserGroup.Admin)] + [VerifyUser(Group = UserGroup.Admin)] public ActionResult Ban([GreaterThanZero]int id) { - if (!ModelState.IsValid) { - return Json(this.CreateJsonErrorResponse("Invalid user id")); - } + return View(); + //if (!ModelState.IsValid) { + // return Json(this.CreateJsonErrorResponse("Invalid user id")); + //} - try { - userService.Delete(id); - return Json(this.CreateJsonResponse()); - } catch (Exception e) { - return Json(this.CreateJsonErrorResponse(e)); - } + //try { + // userService.Delete(id); + // return Json(this.CreateJsonResponse()); + //} catch (Exception e) { + // return Json(this.CreateJsonErrorResponse(e)); + //} } [HttpGet, VerifyUser(Group = UserGroup.Admin)] diff --git a/Src/VideoGameQuotes.Web/Global.asax.cs b/Src/VideoGameQuotes.Web/Global.asax.cs index 60dc2d5..3abde6e 100644 --- a/Src/VideoGameQuotes.Web/Global.asax.cs +++ b/Src/VideoGameQuotes.Web/Global.asax.cs @@ -23,6 +23,8 @@ namespace VideoGameQuotes.Web { .Add>() .Add() .Add(); + + ViewEngines.Engines.Add(Container.Resolve()); } protected override void ConfigureUnity() { diff --git a/VideoGameQuotes.sln b/VideoGameQuotes.sln index 28dd652..f27059e 100644 --- a/VideoGameQuotes.sln +++ b/VideoGameQuotes.sln @@ -13,50 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Src", "Src", "{C8E910E1-B84 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{236929F9-AE7D-4C78-A3D9-E0ED2EA84609}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{4C702D70-7D2E-410D-A3C6-50598863E102}" - ProjectSection(SolutionItems) = preProject - Lib\Antlr3.Runtime.dll = Lib\Antlr3.Runtime.dll - Lib\compressjs.targets = Lib\compressjs.targets - Lib\EcmaScript.NET.modified.dll = Lib\EcmaScript.NET.modified.dll - Lib\Iesi.Collections.dll = Lib\Iesi.Collections.dll - Lib\Iesi.Collections.xml = Lib\Iesi.Collections.xml - Lib\LinFu.DynamicProxy.dll = Lib\LinFu.DynamicProxy.dll - Lib\log4net.dll = Lib\log4net.dll - Lib\log4net.xml = Lib\log4net.xml - Lib\Lucene.Net.dll = Lib\Lucene.Net.dll - Lib\Lucene.Net.xml = Lib\Lucene.Net.xml - Lib\Microsoft.Practices.Unity.Configuration.dll = Lib\Microsoft.Practices.Unity.Configuration.dll - Lib\Microsoft.Practices.Unity.Configuration.xml = Lib\Microsoft.Practices.Unity.Configuration.xml - Lib\Microsoft.Practices.Unity.dll = Lib\Microsoft.Practices.Unity.dll - Lib\Microsoft.Practices.Unity.Interception.Configuration.dll = Lib\Microsoft.Practices.Unity.Interception.Configuration.dll - Lib\Microsoft.Practices.Unity.Interception.Configuration.xml = Lib\Microsoft.Practices.Unity.Interception.Configuration.xml - Lib\Microsoft.Practices.Unity.Interception.dll = Lib\Microsoft.Practices.Unity.Interception.dll - Lib\Microsoft.Practices.Unity.Interception.xml = Lib\Microsoft.Practices.Unity.Interception.xml - Lib\Microsoft.Practices.Unity.xml = Lib\Microsoft.Practices.Unity.xml - Lib\Moq.dll = Lib\Moq.dll - Lib\Moq.xml = Lib\Moq.xml - Lib\MySql.Data.dll = Lib\MySql.Data.dll - Lib\NHibernate.ByteCode.LinFu.dll = Lib\NHibernate.ByteCode.LinFu.dll - Lib\NHibernate.ByteCode.LinFu.xml = Lib\NHibernate.ByteCode.LinFu.xml - Lib\NHibernate.dll = Lib\NHibernate.dll - Lib\NHibernate.xml = Lib\NHibernate.xml - Lib\nunit.framework.dll = Lib\nunit.framework.dll - Lib\nunit.framework.xml = Lib\nunit.framework.xml - Lib\Portoa.dll = Lib\Portoa.dll - Lib\Portoa.Log4Net.dll = Lib\Portoa.Log4Net.dll - Lib\Portoa.Log4Net.xml = Lib\Portoa.Log4Net.xml - Lib\Portoa.Lucene.dll = Lib\Portoa.Lucene.dll - Lib\Portoa.Lucene.xml = Lib\Portoa.Lucene.xml - Lib\Portoa.NHibernate.dll = Lib\Portoa.NHibernate.dll - Lib\Portoa.NHibernate.xml = Lib\Portoa.NHibernate.xml - Lib\Portoa.Web.dll = Lib\Portoa.Web.dll - Lib\Portoa.Web.xml = Lib\Portoa.Web.xml - Lib\Portoa.xml = Lib\Portoa.xml - Lib\Remotion.Data.Linq.dll = Lib\Remotion.Data.Linq.dll - Lib\UnityGenerics.dll = Lib\UnityGenerics.dll - Lib\Yahoo.Yui.Compressor.dll = Lib\Yahoo.Yui.Compressor.dll - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU