1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-05 09:55:20 +02:00

Unit tests and remove unused functions in models/notification (#796)

* Unit tests and remove unused functions in models/notification

* Read -> Unread
This commit is contained in:
Ethan Koenig 2017-01-30 09:21:49 -05:00 committed by Lunny Xiao
parent 77ab60df83
commit 2eb15f4a61
5 changed files with 108 additions and 11 deletions

View file

@ -227,16 +227,6 @@ func (n *Notification) GetIssue() (*Issue, error) {
return n.Issue, err
}
// GetNotificationReadCount returns the notification read count for user
func GetNotificationReadCount(user *User) (int64, error) {
return GetNotificationCount(user, NotificationStatusRead)
}
// GetNotificationUnreadCount returns the notification unread count for user
func GetNotificationUnreadCount(user *User) (int64, error) {
return GetNotificationCount(user, NotificationStatusUnread)
}
// GetNotificationCount returns the notification count for user
func GetNotificationCount(user *User, status NotificationStatus) (int64, error) {
return getNotificationCount(x, user, status)