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

@@ -936,14 +936,14 @@ func (app *appContext) GetUsers(gc *gin.Context) {
// @Summary Get a paginated, searchable list of Jellyfin users.
// @Produce json
// @Param getUsersReqDTO body getUsersReqDTO true "search / pagination parameters"
// @Param ServerSearchReqDTO body ServerSearchReqDTO true "search / pagination parameters"
// @Success 200 {object} getUsersDTO
// @Failure 500 {object} stringResponse
// @Router /users [post]
// @Security Bearer
// @tags Users
func (app *appContext) SearchUsers(gc *gin.Context) {
req := getUsersReqDTO{}
req := ServerSearchReqDTO{}
gc.BindJSON(&req)
if req.SortByField == "" {
req.SortByField = USER_DEFAULT_SORT_FIELD