activity: basic query support

only supports queries of fields actually in Activity. The web UI only
directly queries two of these, ID and Time (mistakenly referneced as date in
the web ui previously). Later commits will come up with creative ways of
dealing with all the other query types.
This commit is contained in:
Harvey Tindall
2025-05-23 16:37:42 +01:00
parent 0a7093a3b4
commit 6fff8a887e
5 changed files with 185 additions and 55 deletions

View File

@@ -175,10 +175,6 @@ type PaginatedReqDTO struct {
Ascending bool `json:"ascending"`
}
type getUsersReqDTO struct {
ServerSearchReqDTO
}
type getUsersDTO struct {
UserList []*respUser `json:"users"`
LastPage bool `json:"last_page"`
@@ -445,12 +441,6 @@ type ActivityDTO struct {
IP string `json:"ip"`
}
type GetActivitiesDTO struct {
// "SortByField" ignores, it's always time.
PaginatedReqDTO
Type []string `json:"type"` // Types of activity to get. Leave blank for all.
}
type GetActivitiesRespDTO struct {
PaginatedDTO
Activities []ActivityDTO `json:"activities"`