From 47a8fdc9c725bfa468e77366e6d136400ef5e947 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 7 May 2017 09:31:55 -0400 Subject: View Group page --- Project-Unite/Controllers/GroupsController.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Project-Unite/Controllers') diff --git a/Project-Unite/Controllers/GroupsController.cs b/Project-Unite/Controllers/GroupsController.cs index 96aa401..e3f0907 100644 --- a/Project-Unite/Controllers/GroupsController.cs +++ b/Project-Unite/Controllers/GroupsController.cs @@ -15,5 +15,16 @@ namespace Project_Unite.Controllers var db = new ApplicationDbContext(); return View(db.Groups); } + + [Authorize] + public ActionResult ViewGroup(string id) + { + var db = new ApplicationDbContext(); + var group = db.Groups.FirstOrDefault(x => x.Id == id); + if (group == null) + return new HttpStatusCodeResult(404); + + return View(group); + } } } \ No newline at end of file -- cgit v1.2.3