mirror of
https://github.com/hrfee/jfa-go.git
synced 2026-03-18 21:50:33 +01:00
jf_activity: paginated list in ui
added POST route for pagination to activity route, a count route, and modified Search and PaginatedList a bit to support lists without search fields (essentially just running an empty search). Visible by clicking on a user's name in the accounts tab.
This commit is contained in:
27
models.go
27
models.go
@@ -174,15 +174,31 @@ type respUser struct {
|
||||
ReferralsEnabled bool `json:"referrals_enabled"`
|
||||
}
|
||||
|
||||
// ServerSearchReqDTO is a usual SortablePaginatedReqDTO with added fields for searching and filtering.
|
||||
type ServerSearchReqDTO struct {
|
||||
SortablePaginatedReqDTO
|
||||
ServerFilterReqDTO
|
||||
}
|
||||
|
||||
// ServerFilterReqDTO provides search terms and queries to a search or count route.
|
||||
type ServerFilterReqDTO struct {
|
||||
SearchTerms []string `json:"searchTerms"`
|
||||
Queries []QueryDTO `json:"queries"`
|
||||
}
|
||||
|
||||
type PaginatedDTO struct {
|
||||
LastPage bool `json:"last_page"`
|
||||
}
|
||||
|
||||
type PaginatedReqDTO struct {
|
||||
Limit int `json:"limit"`
|
||||
Page int `json:"page"` // zero-indexed
|
||||
type SortablePaginatedReqDTO struct {
|
||||
SortByField string `json:"sortByField"`
|
||||
Ascending bool `json:"ascending"`
|
||||
PaginatedReqDTO
|
||||
}
|
||||
|
||||
type PaginatedReqDTO struct {
|
||||
Limit int `json:"limit"`
|
||||
Page int `json:"page"` // zero-indexed
|
||||
}
|
||||
|
||||
type getUsersDTO struct {
|
||||
@@ -520,6 +536,11 @@ type ActivityLogEntriesDTO struct {
|
||||
Entries []ActivityLogEntryDTO `json:"entries"`
|
||||
}
|
||||
|
||||
type PaginatedActivityLogEntriesDTO struct {
|
||||
ActivityLogEntriesDTO
|
||||
PaginatedDTO
|
||||
}
|
||||
|
||||
type ActivityLogEntryDTO struct {
|
||||
mediabrowser.ActivityLogEntry
|
||||
Date int64 `json:"Date"`
|
||||
|
||||
Reference in New Issue
Block a user