Search: default to active if no params
This commit is contained in:
parent
7ba325bcee
commit
656c06d5ce
2 changed files with 24 additions and 0 deletions
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue