diff --git a/controllers/contacts.go b/controllers/contacts.go index c49386f..8e59beb 100644 --- a/controllers/contacts.go +++ b/controllers/contacts.go @@ -58,6 +58,12 @@ func Contacts(c *fiber.Ctx) error { } } + // If active and archive are false, default to active + // This needs to be placed before the security verification + if !params.Active && !params.Archive { + params.Active = true + } + params.PageNumber, _ = strconv.Atoi(c.Query("p")) params.PageSize = 50 params.PersonType = "contacts" @@ -140,6 +146,12 @@ func ContactsExport(c *fiber.Ctx) error { } } + // If active and archive are false, default to active + // This needs to be placed before the security verification + if !params.Active && !params.Archive { + params.Active = true + } + params.PageSize = 0 params.PersonType = "members" diff --git a/controllers/members.go b/controllers/members.go index b42d472..f263fec 100644 --- a/controllers/members.go +++ b/controllers/members.go @@ -73,6 +73,12 @@ func Members(c *fiber.Ctx) error { } } + // If active and archive are false, default to active + // This needs to be placed before the security verification + if !params.Active && !params.Archive { + params.Active = true + } + params.PageNumber, _ = strconv.Atoi(c.Query("p")) params.PageSize = 50 params.PersonType = "members" @@ -155,6 +161,12 @@ func MembersExport(c *fiber.Ctx) error { } } + // If active and archive are false, default to active + // This needs to be placed before the security verification + if !params.Active && !params.Archive { + params.Active = true + } + params.PageSize = 0 params.PersonType = "members"