summaryrefslogtreecommitdiff
path: root/Project-Unite/Controllers/ManageController.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-18 16:18:25 -0400
committerMichael <[email protected]>2017-05-18 16:18:25 -0400
commit1d8b307bb5790aa8c0040a76638f57f757cfb782 (patch)
tree0a5eccc30e386c926db471882c2cde9d4174c669 /Project-Unite/Controllers/ManageController.cs
parent0571a9c8d98d3d01bc1a821577c181a0b722e6c7 (diff)
downloadproject-unite-1d8b307bb5790aa8c0040a76638f57f757cfb782.tar.gz
project-unite-1d8b307bb5790aa8c0040a76638f57f757cfb782.tar.bz2
project-unite-1d8b307bb5790aa8c0040a76638f57f757cfb782.zip
More notification updates
Diffstat (limited to 'Project-Unite/Controllers/ManageController.cs')
-rw-r--r--Project-Unite/Controllers/ManageController.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/Project-Unite/Controllers/ManageController.cs b/Project-Unite/Controllers/ManageController.cs
index 243d2f0..c3d9921 100644
--- a/Project-Unite/Controllers/ManageController.cs
+++ b/Project-Unite/Controllers/ManageController.cs
@@ -111,6 +111,17 @@ namespace Project_Unite.Controllers
}
}
+ public ActionResult Notification(string id, string url)
+ {
+ var db = new ApplicationDbContext();
+ var note = db.Notifications.FirstOrDefault(x => x.Id == id);
+ if (note == null)
+ return new HttpStatusCodeResult(404);
+ note.IsRead = false;
+ db.SaveChanges();
+ return Redirect(url);
+ }
+
public ApplicationUserManager UserManager
{
get
@@ -157,6 +168,7 @@ namespace Project_Unite.Controllers
usr.ShowFollowers = model.ShowFollowers;
usr.ShowFollowed = model.ShowFollowed;
usr.ShowEmail = model.ShowEmail;
+ usr.EmailOnNotifications = model.EmailOnNotifications;
usr.ShowPostAndTopicCounts = model.ShowPostAndTopicCounts;
usr.ShowJoinDate = model.ShowJoinDate;
if (usr.Email != model.Email)
@@ -510,7 +522,7 @@ namespace Project_Unite.Controllers
base.Dispose(disposing);
}
-#region Helpers
+ #region Helpers
// Used for XSRF protection when adding external logins
private const string XsrfKey = "XsrfId";