summaryrefslogtreecommitdiff
path: root/Project-Unite/ACL.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-03-27 15:47:54 -0400
committerMichael <[email protected]>2017-03-27 15:47:54 -0400
commit93734dd552b9c95da23b517ea1f65854f22c68f6 (patch)
treebe392b5c2c05483c70fd1aa06788bb31b297baef /Project-Unite/ACL.cs
parentfd5302fca4ebeba412a7015955f484b3fcbf142f (diff)
downloadproject-unite-93734dd552b9c95da23b517ea1f65854f22c68f6.tar.gz
project-unite-93734dd552b9c95da23b517ea1f65854f22c68f6.tar.bz2
project-unite-93734dd552b9c95da23b517ea1f65854f22c68f6.zip
Unread posts backend.
Diffstat (limited to 'Project-Unite/ACL.cs')
-rw-r--r--Project-Unite/ACL.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Project-Unite/ACL.cs b/Project-Unite/ACL.cs
index 88e2fc2..ca356f9 100644
--- a/Project-Unite/ACL.cs
+++ b/Project-Unite/ACL.cs
@@ -67,6 +67,11 @@ namespace Project_Unite
return hpr.Raw(CommonMark.CommonMarkConverter.Convert(hpr.Encode(md)));
}
+ public static int UnreadPostsCount(string username)
+ {
+ return new ApplicationDbContext().Users.FirstOrDefault(x => x.UserName == username).UnreadPosts.Length;
+ }
+
public static bool IsFollowed(string you, string fId)
{
var db = new ApplicationDbContext();