Added joined groups page

This commit is contained in:
2018-11-22 11:51:44 +09:00
parent da08f80247
commit 7243d02e85
8 changed files with 51 additions and 6 deletions

View File

@ -2,8 +2,16 @@ package groups
import "github.com/animenotifier/arn"
func fetchGroups() []*arn.Group {
func fetchGroups(memberID string) []*arn.Group {
return arn.FilterGroups(func(group *arn.Group) bool {
return !group.IsDraft
if group.IsDraft {
return false
}
if memberID != "" && !group.HasMember(memberID) {
return false
}
return true
})
}