diff options
Diffstat (limited to 'Project-Unite/Controllers')
| -rw-r--r-- | Project-Unite/Controllers/GroupsController.cs | 11 |
1 files changed, 11 insertions, 0 deletions
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 |
