diff options
| author | Michael <[email protected]> | 2017-05-07 09:31:55 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-07 09:31:55 -0400 |
| commit | 47a8fdc9c725bfa468e77366e6d136400ef5e947 (patch) | |
| tree | 7f35dbefcb3b9f305d6b02950301f412f178e14d /Project-Unite/Controllers | |
| parent | 0ae47a126b1fb37ecbc80ecddd34a892fb6fd3b2 (diff) | |
| download | project-unite-47a8fdc9c725bfa468e77366e6d136400ef5e947.tar.gz project-unite-47a8fdc9c725bfa468e77366e6d136400ef5e947.tar.bz2 project-unite-47a8fdc9c725bfa468e77366e6d136400ef5e947.zip | |
View Group page
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 |
